libelection v0.1.2 Election.Strategy.Rancher
This leader election strategy leverages the Rancher Metadata API Docs: http://rancher.com/docs/rancher/latest/en/rancher-services/metadata-service/
When a container is spawned from Rancher it’s assigned a Integer as “create_index” which is guaranteed to be higher than any existing container for the service. This module sets as leader the node of the container with the lowest “create_index” attribute.
Link to this section Summary
Functions
Returns the leader node of the cluster
Link to this section Functions
Link to this function
leader(connected_nodes, config)
Returns the leader node of the cluster
Link to this function
log(level, tag, fun)