Documentation ¶
Index ¶
- func New(addrs []string) (store.Store, error)
- type Etcd
- func (s *Etcd) Close()
- func (s *Etcd) Delete(key string, recursive bool) error
- func (s *Etcd) Exists(key string) (bool, error)
- func (s *Etcd) Get(key string) (pair *store.KVPair, err error)
- func (s *Etcd) GetTree(directory string) ([]*store.KVPair, error)
- func (s *Etcd) List(dir string) ([]string, error)
- func (s *Etcd) Put(key string, value []byte) error
- func (s *Etcd) Watch(key string, ctx context.Context, recursive bool, index uint64) (<-chan *store.Event, error)
- func (s *Etcd) WatchTree(directory string, ctx context.Context, index uint64) (<-chan *store.Event, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Etcd ¶
type Etcd struct {
// contains filtered or unexported fields
}
Etcd is the receiver type for the Store interface
func (*Etcd) Watch ¶
func (s *Etcd) Watch(key string, ctx context.Context, recursive bool, index uint64) (<-chan *store.Event, error)
Watch for changes on a "key" It returns a channel that will receive changes or pass on errors. Upon creation, the current value will first be sent to the channel. Providing a non-nil stopCh can be used to stop watching.
func (*Etcd) WatchTree ¶
func (s *Etcd) WatchTree(directory string, ctx context.Context, index uint64) (<-chan *store.Event, error)
WatchTree watches for changes on a "directory" It returns a channel that will receive changes or pass on errors. Upon creating a watch, the current childs values will be sent to the channel.
Click to show internal directories.
Click to hide internal directories.