Per-connection supervisor using :rest_for_one strategy.
Manages a Finch pool and BatchWriter GenServers for a single named InfluxDB connection with crash isolation.
On init, registers the connection config in
InfluxElixir.Connection so it can be resolved by name
from any process via Connection.fetch!/1 or the facade.
If a Finch pool crashes, all BatchWriters under that connection restart (they depend on the pool). A single BatchWriter crash does NOT take down the pool or sibling writers.
Summary
Functions
Returns a specification to start this module under a supervisor.
Starts a ConnectionSupervisor for a named connection.
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(keyword()) :: Supervisor.on_start()
Starts a ConnectionSupervisor for a named connection.
Config
:name- connection name (atom, required):host- InfluxDB host (no scheme):token- authentication token:database- default database for writes/queries:databases- list of database names (seeInfluxElixir.Config):pool_size- Finch connection pool size (default: 10):batch_writer- keyword options for anInfluxElixir.Write.BatchWriterchild; omitted means no writer- any other
InfluxElixir.Configoption (:api_version,:scheme, ...)
When the configured client is InfluxElixir.Client.HTTP the config is
validated with InfluxElixir.Config.validate!/1, so a typo such as
default_database: fails at startup instead of being silently ignored.
InfluxElixir.Client.Local needs no host, so its config is not validated.