Yggdrasil for RabbitMQ v5.0.2 Yggdrasil.RabbitMQ.Connection View Source

This module defines a RabbitMQ connection process.

Link to this section Summary

Types

Namespace for the connection.

Functions

Returns a specification to start this module under a supervisor.

Gets connection struct from a connection process.

Starts a RabbitMQ connection with a namespace for the configuration. Additionally, you can add GenServer options.

Stops a RabbitMQ connection. Optionally, receives a stop reason (defaults to :normal) and a timeout in milliseconds (defaults to :infinity).

Subscribes to the connection given a namespace.

Link to this section Types

Link to this type

namespace()

View Source
namespace() :: nil | atom()

Namespace for the connection.

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function

get(connection)

View Source
get(GenServer.name()) :: {:ok, term()} | {:error, term()}

Gets connection struct from a connection process.

Link to this function

start_link(namespace, options \\ [])

View Source

Starts a RabbitMQ connection with a namespace for the configuration. Additionally, you can add GenServer options.

Link to this function

stop(connection, reason \\ :normal, timeout \\ :infinity)

View Source
stop(GenServer.name(), term(), :infinity | non_neg_integer()) :: :ok

Stops a RabbitMQ connection. Optionally, receives a stop reason (defaults to :normal) and a timeout in milliseconds (defaults to :infinity).

Link to this function

subscribe(namespace)

View Source
subscribe(namespace()) :: :ok

Subscribes to the connection given a namespace.