Yggdrasil for PostgreSQL v5.0.0 Yggdrasil.Postgres.Connection.Generator View Source
This module defines a supervisor for creating connection pools on demand.
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Gets a connection for a tag
and a namespace
.
Starts a connection pool generator.
Stops a connection pool generator
. Optionally, it receives a reason
(defaults to :normal
) and a timeout
(default to :infinity
).
Link to this section Functions
Link to this function
child_spec(arg) View Source
Returns a specification to start this module under a supervisor.
See Supervisor
.
Link to this function
get_connection(tag, namespace)
View Source
get_connection(tag, namespace)
View Source
get_connection(
Yggdrasil.Postgres.Connection.tag(),
Yggdrasil.Postgres.Connection.namespace()
) :: {:ok, pid()} | {:error, term()}
get_connection( Yggdrasil.Postgres.Connection.tag(), Yggdrasil.Postgres.Connection.namespace() ) :: {:ok, pid()} | {:error, term()}
Gets a connection for a tag
and a namespace
.
Link to this function
start_link(options \\ [])
View Source
start_link(options \\ [])
View Source
start_link(DynamicSupervisor.options()) :: Supervisor.on_start()
start_link(DynamicSupervisor.options()) :: Supervisor.on_start()
Starts a connection pool generator.
Link to this function
stop(generator, reason \\ :normal, timeout \\ :infinity)
View Source
stop(generator, reason \\ :normal, timeout \\ :infinity)
View Source
stop(Supervisor.supervisor(), term(), :infinity | non_neg_integer()) :: :ok
stop(Supervisor.supervisor(), term(), :infinity | non_neg_integer()) :: :ok
Stops a connection pool generator
. Optionally, it receives a reason
(defaults to :normal
) and a timeout
(default to :infinity
).