Peeper.Listener behaviour (peeper v0.3.0)

View Source

The listener that might be implemented and attached to the Peeper.GenServer to receive notifications about process state changes and/or terminations.

Summary

Callbacks

Called when the underlying Peeper.GenServer’s state gets changed

Called when the underlying Peeper.GenServer gets terminated

Callbacks

on_state_changed(old_state, state)

(optional)
@callback on_state_changed(old_state :: term(), state :: term()) :: :ok

Called when the underlying Peeper.GenServer’s state gets changed

on_terminate(reason, state)

(optional)
@callback on_terminate(reason, state :: term()) :: :ok
when reason: :normal | :shutdown | {:shutdown, term()} | term()

Called when the underlying Peeper.GenServer gets terminated