Elixir Nodes task implementation
Erlang OTP 21+ and Elixir 1.8.1+
The application is configurable, the possible configurations are:
default_timeout
- Timeout in ms, default value is500
.max_timeout_multiplier
- Timeout multiplier, default value is4
.table_name
- The name of ETS table, default name is:state
.
Nodes.new_node 1
- takes integers as IDs. Tries to create a new node. Returns{:ok, {node_id, node_pid}}
or{:error,reason}
.Nodes.get_state 1
- takes givenID
and if the given node exists, returns thestate
of the node, or{:error, reason}
.Nodes.get_all_states
- takes no arguments. Returnsstates
of all nodes in alist
. If there are no nodes, returns anempty list
.Nodes.kill_node 1
- tries to terminate the node by givenID
. Returns eithertrue
if the node was killed, orfalse
if not (possibly because it was killed by someone else or just did not exist).