View Source partisan_full_membership_strategy (partisan v5.0.0-beta.15)

This module implements the full-mesh membership strategy.

Link to this section Summary

Functions

Handling incoming protocol message.
Initialize the strategy state.
When a node is connected, return the state, membership and outgoing message queue to be transmitted.
Leave a node from the cluster.
Periodic protocol maintenance.

Link to this section Types

Link to this section Functions

Link to this function

handle_message(_, State)

View Source
-spec handle_message(partisan:message(), State :: any()) ->
                  {ok, membership_list(), outgoing_messages(), NewState :: any()}.
Handling incoming protocol message.
-spec init(partisan:actor()) -> {ok, membership_list(), State :: any()}.
Initialize the strategy state.
Link to this function

join(Node, PeerState, State)

View Source
-spec join(partisan:node_spec(), PeerState :: any(), State :: any()) ->
        {ok, membership_list(), outgoing_messages(), NewState :: any()}.
When a node is connected, return the state, membership and outgoing message queue to be transmitted.
-spec leave(partisan:node_spec(), State :: any()) ->
         {ok, membership_list(), outgoing_messages(), NewState :: any()}.
Leave a node from the cluster.
-spec periodic(State :: any()) -> {ok, membership_list(), outgoing_messages(), NewState :: any()}.
Periodic protocol maintenance.
-spec prune([partisan:node_spec()], State :: any()) -> {ok, membership_list(), NewState :: any()}.