railway_ipc v0.1.5 RailwayIpc.StreamBehaviour behaviour

Link to this section Summary

Link to this section Callbacks

Link to this callback

ack(channel, deliver_tag)

ack(channel :: map(), deliver_tag :: binary()) :: any()
Link to this callback

bind_queue(channel, %{})

bind_queue(channel :: map(), %{
  exchange: binary(),
  queue: binary(),
  consumer: binary()
}) :: :ok | {:error, any()}
Link to this callback

close_connection(connection)

close_connection(connection :: map() | nil) :: any()
Link to this callback

connect()

connect() :: {:ok, %{connection: map(), channel: map()}} | {:error, any()}
Link to this callback

create_queue(channel, queue_name, opts)

create_queue(channel :: map(), queue_name :: String.t(), opts :: list()) ::
  {:ok, map()}
Link to this callback

get_channel(connection)

get_channel(connection :: map()) :: {:ok, channel :: map()} | {:error, any()}
Link to this callback

get_channel_from_cache(connection, channels, consumer_module)

get_channel_from_cache(
  connection :: map(),
  channels :: map(),
  consumer_module :: module()
) :: {:ok, channel_cache :: map(), channel :: map()}
Link to this callback

publish(channel, exchange, message)

publish(channel :: map(), exchange :: binary(), message :: map()) :: any()
Link to this callback

reply(channel, queue, message)

reply(channel :: map(), queue :: binary(), message :: map()) :: any()
Link to this callback

subscribe(channel, queue)

subscribe(channel :: map(), queue :: String.t()) :: any()