Documentation ¶
Index ¶
- 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 Clientv3Facade
- type Config
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 implements kv.Client for etcd.
func NewInMemoryClient ¶
NewInMemoryClient creates an Etcd Client implementation that uses an in-memory version of the underlying Etcd client.
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 Clientv3Facade ¶
Clientv3Facade is a subset of all Etcd client operations that are required to implement an Etcd version of kv.Client
type Config ¶
type Config struct { Endpoints []string `yaml:"endpoints"` DialTimeout time.Duration `yaml:"dial_timeout" category:"advanced"` MaxRetries int `yaml:"max_retries" category:"advanced"` EnableTLS bool `yaml:"tls_enabled" category:"advanced"` TLS dstls.ClientConfig `yaml:",inline"` UserName string `yaml:"username"` Password flagext.Secret `yaml:"password"` }
Config for a new etcd.Client.
func (*Config) RegisterFlags ¶
Click to show internal directories.
Click to hide internal directories.