horde v0.1.3 Horde.Cluster

Public functions to join and leave hordes.

Calling Horde.Cluster.join_hordes/2 will join two nodes in the cluster. Cluster membership is associative so joining a node to another node is the same as joining a node to every node in the second node’s cluster.

{:ok, sup1} = Horde.Supervisor.start_link([], name: :supervisor_1, strategy: :one_for_one)
{:ok, sup2} = Horde.Supervisor.start_link([], name: :supervisor_2, strategy: :one_for_one)

:ok = Horde.Cluster.join_hordes(sup1, sup2)

Calling Horde.Cluster.leave_hordes/1 will instruct a node to remove itself from the cluster.

:ok = Horde.Cluster.leave_hordes(sup1)

Link to this section Summary

Functions

Join two hordes into one big horde. Calling this once will inform every node in each horde of every node in the other horde

Remove an instance of horde from the greater hordes

Get the members (nodes) of the horde

Link to this section Functions

Link to this function join_hordes(horde, other_horde)

Join two hordes into one big horde. Calling this once will inform every node in each horde of every node in the other horde.

Link to this function leave_hordes(horde)

Remove an instance of horde from the greater hordes.

Get the members (nodes) of the horde