Documentation ¶
Index ¶
- type Client
- func (c *Client) AtomicDelete(key string, previous *store.KVPair) (bool, error)
- func (c *Client) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error)
- func (c *Client) Close()
- func (c *Client) Delete(key string) error
- func (c *Client) DeleteTree(dir string) error
- func (c *Client) Exists(key string) (bool, error)
- func (c *Client) Get(key string) (*store.KVPair, error)
- func (c *Client) List(prefix string) ([]*store.KVPair, error)
- func (c *Client) NewLock(key string, options *store.LockOptions) (store.Locker, error)
- func (c *Client) Put(key string, value []byte, options *store.WriteOptions) error
- func (c *Client) Watch(key string, stopCh <-chan struct{}) (<-chan *store.KVPair, error)
- func (c *Client) WatchTree(dir string, stopCh <-chan struct{}) (<-chan []*store.KVPair, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is used to facilitate communications with a drax cluster
func (*Client) AtomicDelete ¶
AtomicDelete is like `Delete`, but makes sure the key is not changed while performing the action.
func (*Client) AtomicPut ¶
func (c *Client) AtomicPut(key string, value []byte, previous *store.KVPair, options *store.WriteOptions) (bool, *store.KVPair, error)
AtomicPut is like `Put`, but ensures there are no changes to the key while the action is performed If the key is changed, this returns an error and does not perorm the requested change
func (*Client) DeleteTree ¶
DeleteTree deletes the specified dir and all subdirs
func (*Client) NewLock ¶
NewLock creates a new lock that can be used to lock access to the given key, like a sync.Mutex
Click to show internal directories.
Click to hide internal directories.