SafeRPC.Server behaviour (safe_rpc v0.1.0)

Copy Markdown View Source

GenServer-like Unix socket server for explicit SafeRPC APIs.

Summary

Callbacks

handle_call(atom, term, term)

@callback handle_call(atom(), term(), term()) :: {:reply, term(), term()}

handle_cast(atom, term, term)

@callback handle_cast(atom(), term(), term()) :: {:noreply, term()}

handle_request(map, term)

@callback handle_request(map(), term()) :: {:reply, term(), term()}

init(keyword)

@callback init(keyword()) :: {:ok, term()} | {:stop, term()}

Functions

start_link(handler, opts)