View Source partisan_full_membership_strategy (partisan v5.0.0-rc.8)
Summary
Functions
Returns the tuple
{Joiners, Leavers}
where Joiners
is the list of node specifications that are elements of List
but are not in the membership set, and Leavers
are the node specifications for the current members that are not elements in List
.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.
Types
-type membership_list() :: partisan_membership_strategy:membership_list().
-type outgoing_messages() :: partisan_membership_strategy:outgoing_messages().
-type t() :: #full_v1{}.
Functions
-spec compare(Members :: [partisan:node_spec()], t()) -> {Joiners :: [partisan:node_spec()], Leavers :: [partisan:node_spec()]}.
{Joiners, Leavers}
where Joiners
is the list of node specifications that are elements of List
but are not in the membership set, and Leavers
are the node specifications for the current members that are not elements in List
.
-spec handle_message(partisan:message(), State :: any()) -> {ok, membership_list(), outgoing_messages(), NewState :: any()}.
-spec init(partisan:actor()) -> {ok, membership_list(), State :: any()}.
-spec join(partisan:node_spec(), PeerState :: any(), State :: any()) -> {ok, membership_list(), outgoing_messages(), NewState :: any()}.
-spec leave(partisan:node_spec(), State :: any()) -> {ok, membership_list(), outgoing_messages(), NewState :: any()}.
-spec periodic(State :: any()) -> {ok, membership_list(), outgoing_messages(), NewState :: any()}.
-spec prune([partisan:node_spec()], State :: any()) -> {ok, membership_list(), NewState :: any()}.