Lepus.Client behaviour (Lepus v0.1.6)

View Source

Client behaviour used in Lepus.

Summary

Types

binary_payload()

@type binary_payload() :: binary()

exchange()

@type exchange() :: String.t()

opts()

@type opts() :: keyword()

payload()

@type payload() :: term()

response()

@type response() :: :ok | {:ok, any()} | {:error, any()}

routing_key()

@type routing_key() :: String.t()

Callbacks

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

@callback publish(
  Supervisor.supervisor(),
  exchange(),
  routing_key(),
  binary_payload(),
  opts()
) ::
  response()

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

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