Documentation ¶
Overview ¶
Package tools implements types which help work with etcd which depend on the api package. TODO: move this package to an etcd specific utility package.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EtcdClient ¶
type EtcdClient interface { GetCluster() []string Get(key string, sort, recursive bool) (*etcd.Response, error) Set(key, value string, ttl uint64) (*etcd.Response, error) Create(key, value string, ttl uint64) (*etcd.Response, error) CompareAndSwap(key, value string, ttl uint64, prevValue string, prevIndex uint64) (*etcd.Response, error) Delete(key string, recursive bool) (*etcd.Response, error) // I'd like to use directional channels here (e.g. <-chan) but this interface mimics // the etcd client interface which doesn't, and it doesn't seem worth it to wrap the api. Watch(prefix string, waitIndex uint64, recursive bool, receiver chan *etcd.Response, stop chan bool) (*etcd.Response, error) }
EtcdClient is an injectable interface for testing.
Click to show internal directories.
Click to hide internal directories.