ex_flux v0.1.0 ExFlux.Database behaviour View Source
Configuration of a single database’s connection pool, queue and supervision tree. Since InfluxDB uses a single server UDP port per database, this library’s goal is to make it easy to do 1:1 mappings of a pool of UDP connections to that destination’s port and batching datapoints.
To get started, create your own module and do something like:
use ExFlux.Database, otp_app: :your_app, database: "your_db_name"
In your application, simply add YourApp.YourExFluxDatabase
to the children:
children = [
...,
YourApp.YourExFluxDatabase
]
The database name isn’t used for the UDP connection in anyway, but it is used to create database-specific workers. To support querying interfaces and HTTP based sending, the database would need to be known. To support these features in the future, the database name is held by all workers in their configuration.
Where possible, ExFlux.Database.Supervisor
provides sane defaults for
configuration options to make it as close as working out of the box as
possible. A full list of configuration options and their types can be found
there.
Link to this section Summary
Callbacks
queue a single data point (may trigger a batch being sent asynchronously)
Link to this section Callbacks
queue a single data point (may trigger a batch being sent asynchronously)