macula_rpc_executor (macula v0.14.3)

View Source

RPC call execution with timeout handling. Executes local handlers and remote calls via QUIC.

Summary

Functions

Execute local handler with timeout.

Execute remote call via QUIC with timeout.

Generate unique call ID (16-byte UUID).

Types

address/0

-type address() :: macula_rpc_dht:address().

handler_fn/0

-type handler_fn() :: macula_rpc_registry:handler_fn().

provider_info/0

-type provider_info() :: macula_rpc_dht:provider_info().

send_fun/0

-type send_fun() :: fun((binary(), map(), address(), pos_integer()) -> {ok, term()} | {error, term()}).

Functions

execute_local(Handler, Args, Timeout)

-spec execute_local(handler_fn(), map(), pos_integer()) -> {ok, term()} | {error, term()}.

Execute local handler with timeout.

execute_remote(Uri, Args, Provider, SendFun, Timeout)

-spec execute_remote(binary(), map(), provider_info(), send_fun(), pos_integer()) ->
                        {ok, term()} | {error, term()}.

Execute remote call via QUIC with timeout.

generate_call_id()

-spec generate_call_id() -> binary().

Generate unique call ID (16-byte UUID).