Versions in this module Expand all Collapse all v1 v1.1.1 Feb 11, 2024 v1.1.0 Feb 6, 2024 Changes in this version + var ErrWatchFuncAlreadyExists = errors.New("watchKeyFunc already exists") + var ErrWatchFuncNotExists = errors.New("watchKeyFunc not exists") + type PlanHandlerFunc func(typeWatch, key string) func(idx uint64, raw any) + type UnwatchKeyFunc func() error + type WatchKeyFunc func(key, sessionID string, value []byte) + type WatchKeys map[string]WatchKeyFunc + type WatchPrefixKey map[string]WatchPrefixKeyFunc + type WatchPrefixKeyFunc func(params map[string][]byte) + type Watcher struct + func NewWatcher(cli *api.Client, logger *zap.Logger) *Watcher + func (w *Watcher) Start(_ context.Context) error + func (w *Watcher) Stop(_ context.Context) error + func (w *Watcher) WatchKeys(keys WatchKeys) error + func (w *Watcher) WatchPrefixKeys(keys WatchPrefixKey) error