Versions in this module Expand all Collapse all v0 v0.0.2 Jan 16, 2024 v0.0.1 Jan 8, 2024 Changes in this version + var ErrNotFound = errors.New("not found") + type Kv struct + func NewKv(prefix string, client *clientv3.Client) *Kv + func (k *Kv) Get(ctx context.Context, key string) ([]byte, error) + func (k *Kv) GetNoCache(ctx context.Context, key string) ([]byte, error) + func (k *Kv) GetString(ctx context.Context, key string) (string, error) + func (k *Kv) Handle(event *clientv3.Event) + func (k *Kv) Len() int + func (k *Kv) OnKeyChange(key string, hook func([]byte) error) bool + func (k *Kv) Prefix() string + func (k *Kv) Preload(ctx context.Context) error + func (k *Kv) SetLogger(logger contract.Logger) *Kv + func (k *Kv) UnsafeGet(ctx context.Context, key string) ([]byte, error) + type Observer interface + Handle func(event *clientv3.Event) + Prefix func() string + type Watcher struct + func NewWatcher(client *clientv3.Client) *Watcher + func (e *Watcher) Attach(observer Observer) + func (e *Watcher) HasObserver(prefix string) bool + func (e *Watcher) Run(ctx context.Context) + func (e *Watcher) SetCommonPrefixMinLen(l int) *Watcher + func (e *Watcher) SetLogger(logger contract.Logger) *Watcher