View Source Lepus.Client behaviour (Lepus v0.1.5)

Client behaviour used in Lepus.

Summary

Types

@type binary_payload() :: binary()
@type exchange() :: String.t()
@type opts() :: keyword()
@type payload() :: term()
@type response() :: :ok | {:ok, any()} | {:error, any()}
@type routing_key() :: String.t()

Callbacks

Link to this callback

publish(supervisor, exchange, routing_key, binary_payload, opts)

View Source
@callback publish(
  Supervisor.supervisor(),
  exchange(),
  routing_key(),
  binary_payload(),
  opts()
) ::
  response()
Link to this callback

publish_json(supervisor, exchange, routing_key, payload, opts)

View Source
@callback publish_json(
  Supervisor.supervisor(),
  exchange(),
  routing_key(),
  payload(),
  opts()
) :: response()