Consul API v1.2.0 Consul.Watch.Handler behaviour

Link to this section Summary

Functions

Notifies handlers attached a Watch's event manager of Consul Events.

Callbacks

Handle notifications of Consul Events. When the handler is initially added all prior events will be notified to the handler, subsequent notifications will occur only upon change.

Link to this section Types

Link to this type

on_return()

on_return() :: {:ok, term()} | :remove_handler

Link to this section Functions

Link to this function

notify_events(manager, events)

notify_events(GenEvent.manager(), [Consul.Event.t()]) :: :ok

Notifies handlers attached a Watch's event manager of Consul Events.

Link to this section Callbacks

Link to this callback

handle_consul_events(events, list)

handle_consul_events(events :: [Consul.Event.t()], list()) :: on_return()

Handle notifications of Consul Events. When the handler is initially added all prior events will be notified to the handler, subsequent notifications will occur only upon change.

See: http://www.consul.io/docs/agent/http.html#event