skycluster v1.1.3 Cluster.Strategy behaviour

This module defines the behaviour for implementing clustering strategies.

Link to this section Summary

Functions

Given a list of node names, attempts to connect to all of them. Returns :ok if all nodes connected, or {:error, [{node, reason}, ..]} if we failed to connect to some nodes

Returns a worker specification for the selected cluster strategy

Starts the selected cluster strategy process

Link to this section Types

Link to this type bad_nodes()
bad_nodes() :: [{node, reason :: term}]

Link to this section Functions

Link to this function connect_nodes(nodes)
connect_nodes([atom]) :: :ok | {:error, bad_nodes}

Given a list of node names, attempts to connect to all of them. Returns :ok if all nodes connected, or {:error, [{node, reason}, ..]} if we failed to connect to some nodes.

All failures are logged.

Returns a worker specification for the selected cluster strategy.

Link to this function start_link()
start_link() :: {:ok, pid} | :ignore | {:error, reason :: term}

Starts the selected cluster strategy process.

Link to this section Callbacks

Link to this callback start_link()
start_link() :: {:ok, pid} | :ignore | {:error, reason :: term}