View Source ProcessHub.Service.Cluster (ProcessHub v0.1.3-alpha)

ProcessHub instances with the same hub_id will automatically form a cluster. The cluster service provides API functions for managing the cluster.

Summary

Functions

Adds a new node to the cluster and returns the new list of nodes.

Returns a boolean indicating whether the node exists in the cluster.

Returns a list of nodes in the cluster.

Sends a cluster join event to the remote node.

Removes a node from the cluster and returns the new list of nodes.

Functions

Link to this function

add_cluster_node(nodes, node)

View Source
@spec add_cluster_node([node()], node()) :: [node()]

Adds a new node to the cluster and returns the new list of nodes.

@spec new_node?([node()], node()) :: boolean()

Returns a boolean indicating whether the node exists in the cluster.

Link to this function

nodes(hub_id, opts \\ [])

View Source
@spec nodes(ProcessHub.hub_id(), [:include_local] | nil) :: [node()]

Returns a list of nodes in the cluster.

Link to this function

propagate_self(hub_id, node)

View Source
@spec propagate_self(ProcessHub.hub_id(), node()) :: term()

Sends a cluster join event to the remote node.

Link to this function

rem_cluster_node(nodes, node)

View Source
@spec rem_cluster_node([node()], node()) :: [node()]

Removes a node from the cluster and returns the new list of nodes.