Documentation
¶
Index ¶
- func WithAfterInitialLoad[T any](callback func()) func(*Watcher[T])
- func WithBeforeUpdate[T any](callback func(entry T, direction mvccpb.Event_EventType)) func(*Watcher[T])
- func WithKeyFunc[T any](kf func(key string) string) func(*Watcher[T])
- func WithPrefix[T any]() func(*Watcher[T])
- type Watcher
- func (w *Watcher[T]) Get(key string) T
- func (w *Watcher[T]) GetOK(key string) (T, bool)
- func (w *Watcher[T]) GetPrefix(parts ...string) (T, bool)
- func (w *Watcher[T]) Iter() iter.Seq2[string, T]
- func (w *Watcher[T]) IterRelativeKey() iter.Seq2[string, T]
- func (w *Watcher[T]) Prefix() *storage.Key
- func (w *Watcher[T]) Start(ctx context.Context)
- func (w *Watcher[T]) Stop()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func WithAfterInitialLoad ¶
func WithBeforeUpdate ¶
func WithBeforeUpdate[T any](callback func(entry T, direction mvccpb.Event_EventType)) func(*Watcher[T])
func WithPrefix ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.