View Source partisan_peer_discovery_agent behaviour (partisan v5.0.0-rc.8)

This state machine is responsible for enabled cluster peers using the defined implementation backend (callback module).

Summary

Callbacks

-callback init(Opts :: map()) -> {ok, State :: any()} | {error, Reason :: any()}.
-callback lookup(State :: any(), Timeout :: timeout()) ->
          {ok, [partisan:node_spec()], NewState :: any()} |
          {error, Reason :: any(), NewState :: any()}.

Functions

Link to this function

code_change(OldVsn, StateName, State, Extra)

View Source
-spec disable() -> ok.
Link to this function

disabled(EventType, EventContent, State)

View Source
-spec enable() -> ok.
Link to this function

enabled(EventType, EventContent, State)

View Source
In this state the agent uses the callback module to discover peers by calling its lookup/2 callback.
-spec start() -> {ok, pid()} | ignore | {error, term()}.
-spec start_link() -> {ok, pid()} | ignore | {error, term()}.
-spec status() -> enabled | disabled.
Link to this function

terminate(Reason, StateName, State)

View Source