Node

Processes

Connect and inspect BEAM nodes.

Distribution is off until you start with --sname / --name (or SELM_NODE / SELM_COOKIE). Then selm run / selm serve start a named node, and selm console opens a Selm REPL on that node (--erl for Erlang remsh).

Node.connect (Node.fromString "other@host")

Node.list

Use Erpc to call functions on another node. Use Process.remoteSubject to send typed mailbox messages to a registered name there.

Types

Node

type Node = Node

A BEAM node name (foo@host).

Examples

Node.fromString "api@127.0.0.1" : Node

Values

self

self : Node

This node.

Examples

Node.self

list

list : List Node

Currently connected nodes (not including self).

Examples

Node.list

connect

connect : Node -> Result String Node

Try to connect to node. Needs distribution started on both sides and a matching cookie.

Examples

Node.connect (Node.fromString "other@host")

disconnect

disconnect : Node -> Bool

Disconnect from node.

Examples

Node.disconnect other

ping

ping : Node -> Bool

True when node answers a ping.

Examples

Node.ping other

fromString

fromString : String -> Node

Parse a node name such as "counter@host".

Examples

Node.fromString "counter@host"

toString

toString : Node -> String

Render a node name.

Examples

Node.toString node