import "github.com/docker/docker/vendor/github.com/docker/libkv/store/etcd"
var ( // ErrAbortTryLock is thrown when a user stops trying to seek the lock // by sending a signal to the stop chan, this is used to verify if the // operation succeeded ErrAbortTryLock = errors.New("lock operation aborted") )
New creates a new Etcd client given a list of endpoints and an optional tls config
func Register()
Register registers etcd to libkv
type Etcd struct {
// contains filtered or unexported fields
}
Etcd is the receiver type for the Store interface
AtomicDelete deletes a value at "key" if the key has not been modified in the meantime, throws an error if this is the case
func (s *Etcd) AtomicPut(key string, value []byte, previous *store.KVPair, opts *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut puts a value at "key" if the key has not been modified in the meantime, throws an error if this is the case
Close closes the client connection
Delete a value at "key"
DeleteTree deletes a range of keys under a given directory
Exists checks if the key exists inside the store
Get the value at "key", returns the last modified index to use in conjunction to Atomic calls
List child nodes of a given directory
NewLock returns a handle to a lock struct which can be used to provide mutual exclusion on a key
Put a value at "key"
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.
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. Providing a non-nil stopCh can be used to stop watching.
Package etcd imports 11 packages (graph). Updated 2020-10-28. Refresh now. Tools for package owners.