View Source partisan_peer_service_client (partisan v5.0.0-rc.8)

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{}.

Functions

Link to this function

code_change(OldVsn, State, Extra)

View Source
-spec code_change(term() | {down, term()}, state(), term()) -> {ok, state()}.
Link to this function

connect(Node, Channel, ChannelOpts)

View Source

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.
Link to this function

handle_call(Event, From, State)

View Source
-spec handle_call(term(), {pid(), term()}, state()) -> {reply, term(), state()}.
Link to this function

handle_cast(Event, State)

View Source
-spec handle_cast(term(), state()) -> {noreply, state()}.
Link to this function

handle_info(Event, State0)

View Source
-spec handle_info(term(), state()) -> {noreply, state()} | {stop, normal, state()}.
-spec init(Args :: list()) -> {ok, state()} | {stop, Reason :: any()}.
Link to this function

start_link(Peer, ListenAddr, Channel, ChannelOpts, From)

View Source
-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()}.
Link to this function

terminate(Reason, State)

View Source
-spec terminate(term(), state()) -> term().