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

The behavior to be implemented by Cloister.Monitor listeners.

Summary

Callbacks

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

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.