Documentation ¶
Index ¶
- Variables
- type Client
- func (c *Client) CAS(ctx context.Context, key string, ...) error
- func (c *Client) Delete(ctx context.Context, key string) error
- func (c *Client) Get(ctx context.Context, key string) (interface{}, error)
- func (c *Client) List(ctx context.Context, prefix string) ([]string, error)
- func (c *Client) WatchKey(ctx context.Context, key string, f func(interface{}) bool)
- func (c *Client) WatchPrefix(ctx context.Context, key string, f func(string, interface{}) bool)
- type CloserFunc
- type Config
Constants ¶
This section is empty.
Variables ¶
View Source
var NopCloser = CloserFunc(func() error { return nil })
NopCloser does nothing.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements ring.KVClient for etcd.
func Mock ¶
Mock returns a Mock Etcd client. Inspired by https://github.com/ligato/cn-infra/blob/master/db/keyval/etcd/mocks/embeded_etcd.go.
func (*Client) CAS ¶
func (c *Client) CAS(ctx context.Context, key string, f func(in interface{}) (out interface{}, retry bool, err error)) error
CAS implements kv.Client.
type CloserFunc ¶
type CloserFunc func() error
CloserFunc is like http.HandlerFunc but for io.Closers.
Click to show internal directories.
Click to hide internal directories.