hare v0.1.7 Hare.RPC.Client behaviour

Summary

Types

meta()
meta() :: map
payload()
payload() :: binary
routing_key()
routing_key() :: binary
state()
state() :: term

Functions

request(client, payload, routing_key \\ "", opts \\ [])
start_link(mod, conn, config, initial, opts \\ [])

Callbacks

connected(meta, state)
connected(meta, state) ::
  {:noreply, state} |
  {:stop, reason :: term, state}
handle_info(meta, state)
handle_info(meta, state) ::
  {:noreply, state} |
  {:stop, reason :: term, state}
handle_ready(meta, state)
handle_ready(meta, state) ::
  {:noreply, state} |
  {:stop, reason :: term, state}
handle_request(payload, routing_key, opts, state)
handle_request(payload, routing_key, opts :: term, state) ::
  {:ok, state} |
  {:ok, payload, routing_key, opts :: term, state} |
  {:reply, response :: term, state} |
  {:stop, reason :: term, response :: binary, state}
init(initial)
init(initial :: term) :: GenServer.on_start
terminate(reason, state)
terminate(reason :: term, state) :: any