View Source partisan_peer_discovery_agent behaviour (partisan v5.0.0-rc.16)
This state machine is responsible for enabled cluster peers using the defined implementation backend (callback module).
Summary
Functions
In this state the agent uses the callback module to discover peers by calling its lookup/2 callback.
Types
-type state() :: #state{enabled :: boolean(), callback_mod :: module() | undefined, callback_config :: map() | undefined, callback_state :: any() | undefined, initial_delay :: integer() | undefined, polling_interval :: integer() | undefined, timeout :: integer() | undefined, peers :: [partisan:node_spec()]}.
Callbacks
Functions
-spec disable() -> ok.
-spec enable() -> ok.
In this state the agent uses the callback module to discover peers by calling its lookup/2 callback.
-spec status() -> enabled | disabled.