Documentation ¶
Index ¶
- Constants
- func New(addrs []string, options *store.Config) (store.Store, error)
- func Register()
- type EtcdV3
- func (s *EtcdV3) AtomicDelete(key string, previous *store.KVPair) (bool, error)
- func (s *EtcdV3) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error)
- func (s *EtcdV3) Close()
- func (s *EtcdV3) Delete(key string) error
- func (s *EtcdV3) DeleteTree(directory string) error
- func (s *EtcdV3) Exists(key string) (bool, error)
- func (s *EtcdV3) Get(key string) (*store.KVPair, error)
- func (s *EtcdV3) List(directory string) ([]*store.KVPair, error)
- func (s *EtcdV3) NewLock(key string, options *store.LockOptions) (store.Locker, error)
- func (s *EtcdV3) Put(key string, value []byte, options *store.WriteOptions) error
- func (s *EtcdV3) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error)
- func (s *EtcdV3) WatchTree(directory string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error)
Constants ¶
View Source
const ( // ETCDV3 backend ETCDV3 store.Backend = "etcdv3" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EtcdV3 ¶
type EtcdV3 struct {
// contains filtered or unexported fields
}
EtcdV3 is the receiver type for the Store interface
func (*EtcdV3) AtomicDelete ¶
AtomicDelete cas deletes a single value
func (*EtcdV3) AtomicPut ¶
func (s *EtcdV3) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut CAS operation on a single value. Pass previous = nil to create a new key.
func (*EtcdV3) DeleteTree ¶
DeleteTree deletes a range of keys under a given directory
func (*EtcdV3) NewLock ¶
NewLock creates a lock for a given key. The returned Locker is not held and must be acquired with `.Lock`. The Value is optional.
Click to show internal directories.
Click to hide internal directories.