LocalCluster v1.0.0 LocalCluster View Source

Easy local cluster handling for Elixir.

This library is a utility library to offer easier testing of distributed clusters for Elixir. It offers very minimal shimming above several built in Erlang features to provide seamless node creations, especially useful when testing distributed applications.

Link to this section Summary

Functions

Starts the current node as a distributed node

Starts a number of namespaced child nodes

Stops the current distributed node and turns it back into a local node

Stops a set of child nodes

Link to this section Functions

Starts the current node as a distributed node.

Link to this function start_nodes(prefix, amount) View Source
start_nodes(binary(), integer()) :: [atom()]

Starts a number of namespaced child nodes.

This will start the current runtime environment on a set of child nodes and return the names of the nodes to the user for further use. All child nodes are linked to the current process, and so will terminate when the parent process does for automatic cleanup.

Link to this function stop() View Source
stop() :: :ok | {:error, atom()}

Stops the current distributed node and turns it back into a local node.

Link to this function stop_nodes(nodes) View Source
stop_nodes([atom()]) :: :ok

Stops a set of child nodes.