Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureRegisterWatcher ¶
func EnsureRegisterWatcher[T any](ctx context.Context, reg WatcherRegistry, w eventsource.Watcher[T]) (string, T, error)
EnsureRegisterWatcher registers a watcher and returns the first set of changes.
func FirstResult ¶
FirstResult checks whether the first set of returned changes are available and returns them, otherwise it kills the worker and waits for the error and returns it.
Types ¶
type Watcher ¶
type Watcher[T any] interface { worker.Worker Changes() <-chan T }
Watcher defines a generic watcher over a set of changes.
type WatcherRegistry ¶
type WatcherRegistry interface { // Register registers a watcher and returns a string that can be used // to unregister it. Register(worker.Worker) (string, error) }
WatcherRegistry defines a generic registry for watchers.
Click to show internal directories.
Click to hide internal directories.