distribute/remote_call

Types

pub type RpcError {
  RpcTimeout
  RpcBadRpc(String)
  RpcFailed(String)
}

Constructors

  • RpcTimeout

    The RPC call timed out.

  • RpcBadRpc(String)

    The RPC returned a badrpc error.

  • RpcFailed(String)

    The RPC failed for another reason.

Values

pub fn call(
  node: String,
  module: String,
  function: String,
  args: List(dynamic.Dynamic),
) -> Result(dynamic.Dynamic, RpcError)

Perform a remote procedure call on a node. Calls module:function(args) on the given node.

pub fn call_with_timeout(
  node: String,
  module: String,
  function: String,
  args: List(dynamic.Dynamic),
  timeout_ms: Int,
) -> Result(dynamic.Dynamic, RpcError)

Uses a default timeout of 5000ms Call with an explicit timeout in milliseconds

Search Document