Versions in this module Expand all Collapse all v0 v0.1.0 Sep 28, 2021 Changes in this version + var ConfigPrefix = constant.ConfigPrefix + ".etcdv3" + type Client struct + 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) GetLeaseSession(ctx context.Context, opts ...concurrency.SessionOption) (leaseSession *concurrency.Session, 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, opts ...concurrency.SessionOption) (mutex *Mutex, err error) + func (client *Client) WatchPrefix(ctx context.Context, prefix string) (*Watch, error) + type Config struct + AutoSyncInterval time.Duration + BasicAuth bool + CaCert string + CertFile string + ConnectTimeout time.Duration + Endpoints []string + KeyFile string + Password string + Secure bool + TTL int + UserName string + func DefaultConfig() *Config + func RawConfig(key string) *Config + func StdConfig(name string) *Config + func (config *Config) BindFlags(fs *flag.FlagSet) + func (config *Config) Build() (*Client, error) + func (config *Config) MustBuild() *Client + func (config *Config) WithLogger(logger *olog.Logger) *Config + type Mutex struct + func (mutex *Mutex) Lock(timeout time.Duration) (err error) + func (mutex *Mutex) TryLock(timeout time.Duration) (err error) + func (mutex *Mutex) Unlock() (err error) + type Watch struct + func (w *Watch) C() chan *clientv3.Event + func (w *Watch) Close() error + func (w *Watch) IncipientKeyValues() []*mvccpb.KeyValue