View Source partisan_peer_service_client (partisan v5.0.0-rc.16)
Summary
Functions
Test harness specific.
Start and link to calling process. If the process is started and can get a connection it returns {ok, pid()}
. Otherwise if it fails with {error, Reason :: any()}
.
Types
-type optional(T) :: T | undefined.
-type state() :: #state{socket :: optional(partisan_peer_socket:t()), listen_addr :: partisan:listen_addr(), channel :: partisan:channel(), channel_opts :: partisan:channel_opts(), encoding_opts :: list(), from :: pid(), peer :: partisan:node_spec()}.
Functions
Test harness specific.
If we're running a local test, we have to use the same IP address for every bind operation, but a different port instead of the standard port.
-spec start_link(Peer :: partisan:node_spec(), ListenAddr :: partisan:listen_addr(), Channel :: partisan:channel(), ChannelOpts :: partisan:channel_opts(), From :: pid()) -> {ok, pid()} | ignore | {error, Reason :: any()}.
Start and link to calling process. If the process is started and can get a connection it returns {ok, pid()}
. Otherwise if it fails with {error, Reason :: any()}
.