Documentation ¶
Index ¶
Constants ¶
View Source
const ( ResponseStateCreated = "Created" ResponseStateUpdated = "Updated" ResponseStateDeleted = "Deleted" ResponseStateUnknown = "Unknown" )
TODO Write comments for states of a Response (e.g. Deleted, Updated, Created).
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Store ¶
type Store interface { // SetPrefix set the prefix to prefix all given keys with. SetKeyPrefix(prefix string) // Get return a specific key. Get(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.GetResponse, error) // Put set a key to a specific value. Put(ctx context.Context, key string, value string, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) // PutTTL set a key to a specific value with a TTL. PutTTL(ctx context.Context, key string, value string, ttl int64, opts ...clientv3.OpOption) (*clientv3.PutResponse, error) // Delete delete a key value pair. Delete(ctx context.Context, key string, opts ...clientv3.OpOption) (*clientv3.DeleteResponse, error) // Txn creates a transaction. Txn(ctx context.Context) clientv3.Txn // Watch watch a key or directory for creation, changes and deletion. Watch(ctx context.Context, key string, opts ...clientv3.OpOption) clientv3.WatchChan // Close closes the watcher and cancels all watch requests. Close() error }
Store Interface to abstract get, put, del, watch actions to etcd datastore. TODO does it make sense to have different datastores?
Click to show internal directories.
Click to hide internal directories.