View Source partisan_gen_fsm behaviour (partisan v5.0.0-beta.21)
Link to this section Summary
Link to this section Callbacks
-callback code_change(OldVsn :: term() | {down, term()},
StateName :: atom(),
StateData :: term(),
Extra :: term()) ->
{ok, NextStateName :: atom(), NewStateData :: term()}.
-callback format_status(Opt, StatusData) -> Status
when
Opt :: normal | terminate,
StatusData :: [PDict | State],
PDict :: [{Key :: term(), Value :: term()}],
State :: term(),
Status :: term().
-callback handle_event(Event :: term(), StateName :: atom(), StateData :: term()) ->
{next_state, NextStateName :: atom(), NewStateData :: term()} |
{next_state,
NextStateName :: atom(),
NewStateData :: term(),
timeout() | hibernate} |
{stop, Reason :: term(), NewStateData :: term()}.
-callback handle_info(Info :: term(), StateName :: atom(), StateData :: term()) ->
{next_state, NextStateName :: atom(), NewStateData :: term()} |
{next_state,
NextStateName :: atom(),
NewStateData :: term(),
timeout() | hibernate} |
{stop, Reason :: normal | term(), NewStateData :: term()}.
-callback handle_sync_event(Event :: term(),
From :: {pid(), Tag :: term()},
StateName :: atom(),
StateData :: term()) ->
{reply, Reply :: term(), NextStateName :: atom(), NewStateData :: term()} |
{reply,
Reply :: term(),
NextStateName :: atom(),
NewStateData :: term(),
timeout() | hibernate} |
{next_state, NextStateName :: atom(), NewStateData :: term()} |
{next_state,
NextStateName :: atom(),
NewStateData :: term(),
timeout() | hibernate} |
{stop, Reason :: term(), Reply :: term(), NewStateData :: term()} |
{stop, Reason :: term(), NewStateData :: term()}.
-callback init(Args :: term()) ->
{ok, StateName :: atom(), StateData :: term()} |
{ok, StateName :: atom(), StateData :: term(), timeout() | hibernate} |
{stop, Reason :: term()} |
ignore.
-callback terminate(Reason :: normal | shutdown | {shutdown, term()} | term(),
StateName :: atom(),
StateData :: term()) ->
term().
Link to this section Functions
Link to this function
enter_loop(Mod, Options, StateName, StateData, ServerName, Timeout)
View Source-spec system_terminate(term(), _, _, [term(), ...]) -> no_return().
Link to this function