partisan_scamp_v2_membership_strategy (partisan v5.0.3)
View SourceSummary
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. Start with an empty state with only ourselves known.
When a remote node is connected, notify that node to add us. Then, perform forwarding, if necessary.
Leave a node from the cluster.
Periodic protocol maintenance.
Types
-type t() :: #scamp_v2{myself :: partisan:node_spec(), actor :: partisan:actor(), partial_view :: [partisan:node_spec()], in_view :: [partisan:node_spec()], last_message_time :: erlang:timestamp() | undefined}.
Functions
-spec compare(Members :: [partisan:node_spec()], t()) -> {Joiners :: [partisan:node_spec()], Leavers :: [partisan:node_spec()]}.
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. Start with an empty state with only ourselves known.
When a remote node is connected, notify that node to add us. Then, perform forwarding, if necessary.
Leave a node from the cluster.
Periodic protocol maintenance.