View Source partisan_scamp_v1_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. 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.
http://stackoverflow.com/questions/8817171/shuffling-elements-in-a-list-randomly-re-arrange-list-elements/8820501#8820501
Types
-type t() :: #scamp_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
.