cloister v0.6.5 Cloister.Listener behaviour View Source

The behavior to be implemented by Cloister.Monitor listeners.

Link to this section Summary

Callbacks

Passed to the Cloister.Monitor.start_link/1 and is being called on each subsequent monitored node state change.

Link to this section Callbacks

Link to this callback

on_state_change(from, state)

View Source

Specs

on_state_change(
  from :: Cloister.Monitor.status(),
  state :: Cloister.Monitor.t()
) :: :ok

Passed to the Cloister.Monitor.start_link/1 and is being called on each subsequent monitored node state change.

Listeners are obliged to handle :up, :rehashing and :stopping events.