References
| async_call/4 | Implements call streams with promises, a type of RPC which does not suspend the caller until the result is finished. |
| call/4 | Evaluates apply(Module, Function, Args) on the node Node and returns the corresponding value Res, or {badrpc, Reason} if the call fails. |
| call/5 | Evaluates apply(Module, Function, Args) on the node Node and returns the corresponding value Res, or {badrpc, Reason} if the call fails. |
| call/6 | Evaluates apply(Module, Function, Args) on the node Node and returns the corresponding value Res, or {badrpc, Reason} if the call fails. |
| cast/4 | No response is delivered and the calling process is not suspended until the evaluation is complete, as is the case with call/4,5. |
| multicall/4 | A multicall is an RPC which is sent concurrently from one client to multiple servers. |
| multicall/5 | A multicall is an RPC which is sent concurrently from one client to multiple servers. |
| nb_yield/1 | This is able to call non-blocking. |
| nb_yield/2 | This is able to call non-blocking. |
| node/0 | Returns the name of the local node. |
| nodes/0 | Returns a list of all connected nodes in the system, excluding the local node. |
| ping/1 | Tries to set up a connection to Node. |
| port/0 | Returns the port number of the local node. |
| start/0 | Launch leo-rpc. |
| status/0 | Retrieve status of active connections. |
async_call(Node, Mod, Method, Args) -> pid()
Node = atom()Mod = module()Method = atom()Args = [any()]
Implements call streams with promises, a type of RPC which does not suspend the caller until the result is finished. Instead, a key is returned which can be used at a later stage to collect the value. The key can be viewed as a promise to deliver the answer.
call(Node, Mod, Method, Args) -> Ret | {badrpc, any()}
Node = atom()Mod = module()Method = atom()Args = [any()]Ret = any()
Evaluates apply(Module, Function, Args) on the node Node and returns the corresponding value Res, or {badrpc, Reason} if the call fails.
call(Node, Mod, Method, Args, Timeout) -> Ret | {badrpc, any()}
Node = atom()Mod = module()Method = atom()Args = [any()]Timeout = pos_integer()Ret = any()
Evaluates apply(Module, Function, Args) on the node Node and returns the corresponding value Res, or {badrpc, Reason} if the call fails.
call(From, Node, Mod, Method, Args, Timeout) -> Ret | {badrpc, any()}
From = pid()Node = atom()Mod = module()Method = atom()Args = [any()]Timeout = pos_integer()Ret = any()
Evaluates apply(Module, Function, Args) on the node Node and returns the corresponding value Res, or {badrpc, Reason} if the call fails.
cast(Node, Mod, Method, Args) -> true
Node = atom()Mod = module()Method = atom()Args = [any()]
No response is delivered and the calling process is not suspended until the evaluation is complete, as is the case with call/4,5.
multicall(Nodes, Mod, Method, Args) -> Ret | {badrpc, any()}
Nodes = [atom()]Mod = module()Method = atom()Args = [any()]Ret = any()
A multicall is an RPC which is sent concurrently from one client to multiple servers. This is useful for collecting some information from a set of nodes.
multicall(Nodes, Mod, Method, Args, Timeout) -> Ret | {badrpc, any()}
Nodes = [atom()]Mod = module()Method = atom()Args = [any()]Timeout = pos_integer()Ret = [any()]
A multicall is an RPC which is sent concurrently from one client to multiple servers. This is useful for collecting some information from a set of nodes.
nb_yield(Key) -> {value, any()} | timeout
Key = pid()
This is able to call non-blocking. It returns the tuple {value, Val} when the computation has finished, or timeout when Timeout milliseconds has elapsed.
nb_yield(Key, Timeout) -> {value, any()} | timeout
Key = pid()Timeout = pos_integer()
This is able to call non-blocking. It returns the tuple {value, Val} when the computation has finished, or timeout when Timeout milliseconds has elapsed.
node() -> Node
Node = atom()
Returns the name of the local node. The default name is nonode@nohost.
nodes() -> Nodes
Nodes = [atom()]
Returns a list of all connected nodes in the system, excluding the local node.
ping(Node) -> pong | pang
Node = atom()
Tries to set up a connection to Node. Returns pang if it fails, or pong if it is successful.
port() -> pos_integer()
Returns the port number of the local node.
start() -> ok | {error, any()}
Launch leo-rpc
status() -> {ok, [#rpc_info{}]} | {error, any()}
Retrieve status of active connections.
Generated by EDoc