LocalCluster (LocalCluster v1.2.1) 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
Specs
start() :: :ok
Starts the current node as a distributed node.
Specs
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.
The :applications option allows the caller to provide an ordered list
of applications to be started on child nodes. This is useful when you
need to control startup sequences, or omit applications completely. If
this option is not provided, all currently loaded applications on the
local node will be used as a default.
The :files option can be used to load additional files onto remote
nodes, which are then compiled on the remote node. This is necessary
if you wish to spawn tasks from inside test code, as test code would
not typically be loaded automatically.
Specs
stop() :: :ok | {:error, atom()}
Stops the current distributed node and turns it back into a local node.
Specs
stop_nodes([atom()]) :: :ok
Stops a set of child nodes.