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 ¶ added in v1.13.0
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 ¶ added in v1.13.0
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"` MaxRetries int `yaml:"max_retries"` EnableTLS bool `yaml:"tls_enabled"` TLS cortextls.ClientConfig `yaml:",inline"` UserName string `yaml:"username"` Password string `yaml:"password"` }
Config for a new etcd.Client.
func (*Config) RegisterFlags ¶
Click to show internal directories.
Click to hide internal directories.