# README
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.
# Packages
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Package zookeeper is a generated GoMock package.
# Functions
CheckRequestOptions checks if request options use supported keywords.
DeleteWithOptions handles DeleteRequest with options.
SetWithOptions handles SetRequest with request options.
# Structs
DeleteRequest is the object describing a delete state request.
DeleteStateOption controls how a state store reacts to a delete request.
GetRequest is the object describing a state fetch request.
GetResponse is the request object for getting state.
GetStateOption controls how a state store reacts to a get request.
Metadata contains a state store specific set of metadata properties.
SetRequest is the object describing an upsert request.
SetStateOption controls how a state store reacts to a set request.
TransactionalStateOperation describes operation type, key, and value for transactional operation.
TransactionalStateRequest describes a transactional operation against a state store that comprises multiple types of operations The Request field is either a DeleteRequest or SetRequest.
# Interfaces
KeyInt is an interface that allows gets of the Key and Metadata inside requests.
Store is an interface to perform operations on store.
TransactionalStore is an interface for initialization and support multiple transactional requests.
# Type aliases
OperationType describes a CRUD operation performed against a state store.