View Source Cloister.Listener behaviour (cloister v0.12.5)

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
@callback on_state_change(
  from :: Cloister.Monitor.Fsm.state(),
  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.