partisan_erpc (partisan v5.0.1)
View SourceThis module is an adaptation of Erlang erpc
module.
It replaces all instances of erlang:send/2` and `erlang:monitor/2` with their Partisan counterparts. It maintains the `erpc
API with the following exceptions:
TODO - Channels
NOTICE: At the moment this only works for partisan_pluggable_peer_service_manager
.
Summary
Types
-opaque request_id()
Functions
-spec check_response(Message, RequestId) -> {response, Result} | no_response when Message :: term(), RequestId :: request_id(), Result :: term().
-spec receive_response(RequestId) -> Result when RequestId :: request_id(), Result :: term().
-spec receive_response(RequestId, Timeout) -> Result when RequestId :: request_id(), Timeout :: 0..4294967295 | infinity, Result :: term().
-spec send_request(Node, Fun) -> RequestId when Node :: node(), Fun :: function(), RequestId :: request_id().
-spec send_request(Node, Module, Function, Args) -> RequestId when Node :: node(), Module :: atom(), Function :: atom(), Args :: [term()], RequestId :: request_id().
-spec wait_response(RequestId) -> {response, Result} | no_response when RequestId :: request_id(), Result :: term().
-spec wait_response(RequestId, WaitTime) -> {response, Result} | no_response when RequestId :: request_id(), WaitTime :: 0..4294967295 | infinity, Result :: term().