Named supervision tree for a Quiver HTTP client instance.
Starts a Registry for pool lookup and a DynamicSupervisor for pool processes.
Pool config rules are parsed eagerly via Quiver.Config.validate_pool/1 and
stored in :persistent_term. All configuration is validated once at startup;
downstream pools and transports trust the pre-validated config.
Options
:name- Atom identifying this instance (default:Quiver.Pool). Must be a compile-time atom; dynamic atom creation from user input will exhaust the atom table.:pools- Map of origin patterns to pool configuration. Keys are URI strings, wildcard patterns ("https://*.example.com"), or:default. Rules are matched by specificity: exact > wildcard > default.
Pool Configuration
:size(integer/0) - Number of connections in the pool. The default value is10.:checkout_timeout(integer/0) - Max wait time in ms to acquire a connection. The default value is5000.:idle_timeout(integer/0) - Time in ms before idle connections are closed. The default value is30000.:ping_interval(integer/0) - Interval in ms to check connection health. The default value is5000.:protocol(:auto|:http1|:http2) - HTTP protocol version. :auto detects via ALPN negotiation. The default value is:auto.:max_connections(integer/0) - Max HTTP/2 connections per origin. The default value is1.:connect_timeout(integer/0) - TCP/TLS connect timeout in ms. The default value is5000.:recv_timeout(integer/0) - Socket receive timeout in ms. The default value is15000.:buffer_size(integer/0) - Socket receive buffer size in bytes. The default value is8192.:verify(:verify_peer|:verify_none) - TLS certificate verification mode. The default value is:verify_peer.:cacerts(:default| list ofterm/0) - CA certificates. :default uses OS store. The default value is:default.:alpn_advertised_protocols(list ofString.t/0) - ALPN protocols to advertise during TLS. The default value is[].:proxy(keyword/0)
Examples
# Using the default name:
children = [{Quiver.Supervisor, pools: %{default: [size: 5]}}]
# Using a custom name:
children = [
{Quiver.Supervisor,
name: :my_client,
pools: %{
:default => [size: 5],
"https://api.example.com" => [size: 25, protocol: :http2],
"https://*.cdn.example.com" => [size: 50, connect_timeout: 10_000]
}}
]
Summary
Functions
Returns a specification to start this module under a supervisor.
Derives the Registry name for a Quiver instance.
Starts a Quiver instance with the given pool configuration.
Derives the DynamicSupervisor name for a Quiver instance.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Derives the Registry name for a Quiver instance.
@spec start_link( name: atom(), pools: %{optional(binary() | :default) => Quiver.Config.pool_opts()} ) :: Supervisor.on_start()
Starts a Quiver instance with the given pool configuration.
Derives the DynamicSupervisor name for a Quiver instance.