Yggdrasil for RabbitMQ v5.0.2 Yggdrasil.RabbitMQ.Connection.Pool View Source
RabbitMQ connection pool.
Link to this section Summary
Types
Channel callback function.
Channel callback return.
Callback for running functions using RabbitMQ channels.
Functions
Returns a specification to start this module under a supervisor.
Starts a connection pool using an initial client
. Optionally, it receives
some Supervisor
options
.
Stops a RabbitMQ connection pool
. Optionally, it receives a stop reason
(defaults to :normal
) and timeout (defaults to :infinity
).
Runs a channel callback
in a client
.
Link to this section Types
channel_callback()
View Sourcechannel_callback() :: (AMQP.Channel.t() -> channel_callback_return())
Channel callback function.
Channel callback return.
rabbit_callback()
View Sourcerabbit_callback() :: (Yggdrasil.Channel.t() -> :ok | {:ok, term()} | {:error, term()})
Callback for running functions using RabbitMQ channels.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor
.
start_link(client, options \\ [])
View Sourcestart_link(Yggdrasil.RabbitMQ.Client.t(), [ Supervisor.option() | Supervisor.init_option() ]) :: Supervisor.on_start()
Starts a connection pool using an initial client
. Optionally, it receives
some Supervisor
options
.
stop(pool, reason \\ :normal, timeout \\ :infinity)
View Sourcestop(Supervisor.supervisor(), term(), :infinity | non_neg_integer()) :: :ok
Stops a RabbitMQ connection pool
. Optionally, it receives a stop reason
(defaults to :normal
) and timeout (defaults to :infinity
).
with_channel(client, callback)
View Sourcewith_channel(Yggdrasil.RabbitMQ.Client.t(), channel_callback()) :: channel_callback_return()
Runs a channel callback
in a client
.