components-contrib/state
Young Bu Park c69d5ea2ca
Add metadata property to TransactionalRequest (#430)
* Add Metadata to transactional request

* Use new transactional request strcut
2020-08-12 09:30:37 -07:00
..
aerospike State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
aws/dynamodb [DynamoDB] Update BulkSet and BulkDelete with BatchWriteItem (#331) 2020-05-27 15:12:34 -07:00
azure Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00
cassandra Upgrade go version to 1.14.3 and linter version to 1.26.0 (#352) 2020-05-29 15:26:33 -07:00
cloudstate Upgrade go version to 1.14.3 and linter version to 1.26.0 (#352) 2020-05-29 15:26:33 -07:00
couchbase State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
etcd State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
gcp/firestore State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
hashicorp/consul Upgrade go version to 1.14.3 and linter version to 1.26.0 (#352) 2020-05-29 15:26:33 -07:00
hazelcast State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
memcached State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
mongodb Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00
postgresql Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00
redis Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00
sqlserver Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00
zookeeper State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
Readme.md Initial implementation (#116) 2020-03-04 14:42:02 -08:00
metadata.go Adding license header and updating to MIT license. (#26) 2019-10-09 10:58:08 -07:00
request_options.go State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
request_options_test.go State Store Components changes to adhere runtime changes for removing retry options (#426) 2020-08-11 10:50:31 -07:00
requests.go Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00
responses.go - adding more corrections 2019-10-10 18:16:08 -07:00
store.go Change TransactionalStateStore interface to TransactionalStore (#114) 2019-11-08 12:10:19 -08:00
transactional_store.go Add metadata property to TransactionalRequest (#430) 2020-08-12 09:30:37 -07:00

Readme.md

State Stores

State Stores provide a common way to interact with different data store implementations, and allow users to opt-in to advanced capabilities using defined metadata.

Currently supported state stores are:

  • AWS DynamoDB
  • Azure CosmosDB
  • Azure Table Storage
  • Cassandra
  • Cloud Firestore (Datastore mode)
  • CloudState
  • Couchbase
  • Etcd
  • HashiCorp Consul
  • Hazelcast
  • Memcached
  • MongoDB
  • Redis
  • SQL Server
  • Zookeeper
  • Cloud Firestore (Datastore mode)
  • Couchbase

Implementing a new State Store

A compliant state store needs to implement one or more interfaces: Store and TransactionalStore.

The interface for Store:

type Store interface {
	Init(metadata Metadata) error
	Delete(req *DeleteRequest) error
	BulkDelete(req []DeleteRequest) error
	Get(req *GetRequest) (*GetResponse, error)
	Set(req *SetRequest) error
	BulkSet(req []SetRequest) error
}

The interface for TransactionalStore:

type TransactionalStore interface {
	Init(metadata Metadata) error
	Multi(reqs []TransactionalRequest) error
}

See the documentation repo for examples.