Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DataStore ¶
type DataStore interface { Put(ctx context.Context, key string, value string) error Get(ctx context.Context, key string) (map[string]string, error) Delete(ctx context.Context, key string) error GetWithPrefix(ctx context.Context, keyPrefix string) (map[string]string, error) }
func NewDataStore ¶
func NewDataStore(etcdInterface clients.EtcdInterface) (DataStore, error)
type EnvironmentSTMApplier ¶ added in v0.3.0
type EnvironmentSTMApplier struct {
// contains filtered or unexported fields
}
EnvironmentSTMApplier supports transactional updates to an environment
type EnvironmentStore ¶
type EnvironmentStore interface { // PutEnvironment performs a transactional put. It retrieves the environment using the 'name', validates the environment // based on the implementation of 'validateAndUpdateEnv' and updates the environment with the environment // returned by 'validateAndUpdateEnv' all within a transaction. PutEnvironment(ctx context.Context, name string, validateAndUpdateEnv storetypes.ValidateAndUpdateEnvironment) error // GetEnvironment retrieves an environment by name GetEnvironment(ctx context.Context, name string) (*types.Environment, error) // DeleteEnvironment 'deletes' an environment by name DeleteEnvironment(ctx context.Context, name string) error // ListEnvironments lists all environments ListEnvironments(ctx context.Context) ([]types.Environment, error) }
EnvironmentStore defines methods to handle interactions with the datastore related to environments
func NewEnvironmentStore ¶
func NewEnvironmentStore(ds DataStore, ts EtcdTXStore) (EnvironmentStore, error)
type EtcdTXStore ¶ added in v0.3.0
type EtcdTXStore interface { GetV3Client() *clientv3.Client NewSTMRepeatable(context.Context, *clientv3.Client, func(concurrency.STM) error) (*clientv3.TxnResponse, error) }
EtcdTXStore defines methods to support etcd's STM
func NewEtcdTXStore ¶ added in v0.3.0
func NewEtcdTXStore(v3Client *clientv3.Client) (EtcdTXStore, error)
NewEtcdTXStore initializs the etcdTransactionalStore struct
Source Files ¶
Click to show internal directories.
Click to hide internal directories.