AntlUtilsElixir.RpcClient (antl_utils_elixir v1.4.5)

A tiny Rpc Client

Link to this section Summary

Functions

Executes functions on a remote node. Logs call and response.

Similar to call/4 but raises if the call failed.

Link to this section Functions

Link to this function

call(remote_node, module, function_name, attributes)

Specs

call(atom(), atom(), atom(), [any()]) :: any()

Executes functions on a remote node. Logs call and response.

Examples

iex> AntlUtilsElixir.RpcClient.call(:node, Kernel, :+, [1, 2])
3

iex> AntlUtilsElixir.RpcClient.call(:node, Kernel, :undefined_function, [1, 2])
{:error, :failed}
Link to this function

call!(remote_node, module, function_name, attributes)

Specs

call!(atom(), atom(), atom(), [any()]) :: any()

Similar to call/4 but raises if the call failed.

Examples

iex> AntlUtilsElixir.RpcClient.call!(:node, Kernel, :+, [1, 2])
3

iex> AntlUtilsElixir.RpcClient.call!(:node, Kernel, :undefined_function, [1, 2])
(** RpcError) got: "failure reason"