gleam/erlang/node
Types
pub type ConnectError {
FailedToConnect
LocalNodeIsNotAlive
}
Constructors
-
FailedToConnect
Was unable to connect to the node.
-
LocalNodeIsNotAlive
The local node is not alive, so it is not possible to connect to the other node.
Functions
pub fn connect(node: Atom) -> Result(Node, ConnectError)
Establish a connection to a node, so the nodes can send messages to each other and any other connected nodes.
Returns Error(FailedToConnect)
if the node is not reachable.
Returns Error(LocalNodeIsNotAlive)
if the local node is not alive, meaning
it is not running in distributed mode.
pub fn send(node: Node, name: Atom, message: a) -> Nil
Send a message to a named process on a given node.
These messages are untyped, like regular Erlang messages.