Documentation
¶
Index ¶
- type Client
- func (client *Client) DelPrefix(ctx context.Context, prefix string) (deleted int64, err error)
- func (client *Client) GetKeyValue(ctx context.Context, key string) (kv *mvccpb.KeyValue, err error)
- func (client *Client) GetPrefix(ctx context.Context, prefix string) (map[string]string, error)
- func (client *Client) GetValues(ctx context.Context, keys ...string) (map[string]string, error)
- func (client *Client) NewMutex(key string) (mutex *Mutex, err error)
- func (client *Client) NewWatch(prefix string) (*Watch, error)
- type Config
- type Mutex
- type Watch
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
Client ...
func (*Client) GetKeyValue ¶
GetKeyValue queries etcd key, returns mvccpb.KeyValue
type Config ¶
type Config struct {
Endpoints []string `json:"endpoints"`
CertFile string `json:"certFile"`
KeyFile string `json:"keyFile"`
CaCert string `json:"caCert"`
BasicAuth bool `json:"basicAuth"`
UserName string `json:"userName"`
Password string `json:"-"`
// 连接超时时间
ConnectTimeout time.Duration `json:"connectTimeout"`
Secure bool `json:"secure"`
// 自动同步member list的间隔
AutoSyncInterval time.Duration `json:"autoAsyncInterval"`
// contains filtered or unexported fields
}
Config ...
Click to show internal directories.
Click to hide internal directories.