View Source Jetstream.API.KV.Watcher (jetstream v0.0.8-alpha2)
The watcher server establishes a subscription to the changes that occur to a given key-value bucket. The consumer-supplied handler function will be sent an indicator as to whether the change is a delete or an add, as well as the key being changed and the value (if it was added).
Ensure that you call stop with a watcher pid when you no longer need to be notified about key changes
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback implementation for GenServer.init/1.
Link to this section Types
Specs
Specs
watcher_options() ::
{:conn, Gnat.t()}
| {:bucket_name, String.t()}
| {:handler, keywatch_handler()}
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback implementation for GenServer.init/1.
Specs
start_link(opts :: [watcher_options()]) :: GenServer.on_start()