store

package
Version: v0.0.0-...-abfb793 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 2, 2017 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ContainerInstanceStore

type ContainerInstanceStore interface {
	AddContainerInstance(instance string) error
	GetContainerInstance(cluster string, instanceARN string) (*storetypes.VersionedContainerInstance, error)
	ListContainerInstances() ([]storetypes.VersionedContainerInstance, error)
	FilterContainerInstances(filterMap map[string]string) ([]storetypes.VersionedContainerInstance, error)
	StreamContainerInstances(ctx context.Context, entityVersion string) (chan storetypes.VersionedContainerInstance, error)
	DeleteContainerInstance(cluster, instanceARN string) error
}

ContainerInstanceStore defines methods to access container instances from the datastore

func NewContainerInstanceStore

func NewContainerInstanceStore(ds DataStore, ts EtcdTXStore) (ContainerInstanceStore, error)

NewContainerInstanceStore inistializes the eventInstanceStore struct

type DataStore

type DataStore interface {
	GetWithPrefix(keyPrefix string) (map[string]storetypes.Entity, error)
	Get(key string) (map[string]storetypes.Entity, error)
	Add(key string, value string) error
	StreamWithPrefix(ctx context.Context, keyPrefix string, entityVersion string) (chan map[string]storetypes.Entity, error)
	Delete(key string) (int64, error)
}

DataStore defines methods to access the database

func NewDataStore

func NewDataStore(etcdInterface clients.EtcdInterface) (DataStore, error)

NewDataStore initializes the etcdDataStore struct

type EtcdTXStore

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

func NewEtcdTXStore(v3Client *clientv3.Client) (EtcdTXStore, error)

NewEtcdTXStore initializs the etcdTransactionalStore struct

type STMApplier

type STMApplier struct {
	// contains filtered or unexported fields
}

type Stores

type Stores struct {
	TaskStore              TaskStore
	ContainerInstanceStore ContainerInstanceStore
}

func NewStores

func NewStores(datastore DataStore, etcdTXStore EtcdTXStore) (Stores, error)

type TaskStore

type TaskStore interface {
	AddTask(task string) error
	GetTask(cluster string, taskARN string) (*storetypes.VersionedTask, error)
	ListTasks() ([]storetypes.VersionedTask, error)
	FilterTasks(filterMap map[string]string) ([]storetypes.VersionedTask, error)
	StreamTasks(ctx context.Context, entityVersion string) (chan storetypes.VersionedTask, error)
	DeleteTask(cluster, taskARN string) error
}

TaskStore defines methods to access tasks from the datastore

func NewTaskStore

func NewTaskStore(ds DataStore, ts EtcdTXStore) (TaskStore, error)

NewTaskStore initializes the eventTaskStore struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL