Versions in this module Expand all Collapse all v0 v0.2.0 Jul 8, 2021 Changes in this version + type Cli struct + func NewEtcdClient(endpoints []string, userName, password string) (*Cli, error) + func (cli *Cli) Delete(ctx context.Context, key string) error + func (cli *Cli) DeleteWithPrefix(ctx context.Context, key string) error + func (cli *Cli) KeepAlive(ctx context.Context, key, value string, ttl int64) (clientv3.LeaseID, error) + func (cli *Cli) KeepAliveOnce(ctx context.Context, key, value string, ttl int64) error + func (cli *Cli) Put(ctx context.Context, key, value string) error + func (cli *Cli) PutWithNotExist(ctx context.Context, key, value string) (bool, error) + func (cli *Cli) Revoke(ctx context.Context, id clientv3.LeaseID) error + func (cli *Cli) Watch(ctx context.Context, key string) *WatchKeyResponse + func (cli *Cli) WatchWithPrefix(ctx context.Context, prefix string) *WatchKeyResponse + type EventType int32 + const CreateKeyChangeEvent + const DeleteKeyChangeEvent + const UpdateKeyChangeEvent + type KeyChangeEvent struct + Key []byte + Type EventType + Value []byte + type WatchKeyResponse struct + Event <-chan *KeyChangeEvent + Id clientv3.LeaseID + Watcher clientv3.Watcher