libelection v0.1.2 Election.Elector
This module implements simple leader election using a provided strategy module
Options
strategy
: A module to use to determine candidate nodes and pick one of them as the leaderfirst_election_in
: How much time in milliseconds before trying to elect a leader for the first time. Defaults in 0.polling_interval
: How often to re-elect in milliseconds. Defaults to 1 second.
Link to this section Summary
Functions
Triggers an election
Returns the current leader node
Returns true only if the current node is the leader
Returns a list of all the nodes of the cluster including the current
Starts the an Election server with the given arguments
Link to this section Functions
Triggers an election
Returns the current leader node
Returns true only if the current node is the leader
Returns a list of all the nodes of the cluster including the current
Link to this function
log(level, tag, fun)
Link to this function
new_leader(map, state)
Starts the an Election server with the given arguments