consul v1.1.0 Consul.Watch.Handler behaviour

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

Types

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

Functions

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

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

Callbacks

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