Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrWatchCanceled = errors.New("watcher error: watcher canceled")
ErrWatchCanceled is returned if the watcher is canceled.
View Source
var ErrWatchNotSupported = errors.New("this backend doesn't support watches - use polling instead")
ErrWatchNotSupported is returned if the backend has no watch support and the WatchPrefix method is called.
Functions ¶
This section is empty.
Types ¶
type ReadWatcher ¶
type ReadWatcher interface { GetValues(keys []string) (map[string]string, error) WatchPrefix(ctx context.Context, prefix string, opts ...WatchOption) (uint64, error) Close() }
A ReadWatcher - can get values and watch a prefix for changes
type WatchOption ¶
type WatchOption func(*WatchOptions)
WatchOption configures the WatchPrefix operation
func WithKeys ¶
func WithKeys(keys []string) WatchOption
WithKeys reduces the scope of keys that can trigger updates to keys (not an exact match)
func WithWaitIndex ¶
func WithWaitIndex(waitIndex uint64) WatchOption
WithWaitIndex sets the WaitIndex of the watcher
type WatchOptions ¶
WatchOptions represents options for watch operations
Click to show internal directories.
Click to hide internal directories.