ex_flux v0.2.1 ExFlux.Database.Supervisor View Source
Orchestration and supervision of ex_influx database components
The two components of an ex_influx database process: a "sliding buffer" queue,
ExFlux.Database.QueueWorker, and a pool of connections to the influxdb
server, ExFlux.Database.PoolWorker.
Common options for the queue, pool and/or the query interface:
:database- the name of the database:host- hostname of the influxdb server
The options required by the queue are:
:batch_size- an upper limit on the number of points to send at once:max_queue_size- a limit to the number of points to attempt to hold if the data cannot be shipped to influxdb fast enough:flush_interval- a time interval in seconds used to help drain the queue
The options required by the pool are:
:pool_size- the number of connections/workers to maintain (via:poolboy):pool_overflow- if set to a number > 0, this allows poolboy to create extra workers when the demand for workers exceeds the supply:upd_conn_opts- a list of one or more UDP connection options required by:gen_udp, defaults to[:binary, {:active, false}]since we are exclusively writing:udp_port- the port number influxdb is listening on for this particular database
The options required by the http interface:
:http_port- the port number for the query interface (defaults to 8086):json_encoder- encoder/decoder to use for responses, defaults toPoison:http_opts- extra options passed toHTTPoisonseeHTTPoison.request/5for more details (defaults to[timeout: 5000])
Link to this section Summary
Functions
Returns a specification to start this module under a supervisor.
Callback invoked to start the supervisor and during hot code upgrades.
Merge the config and defaults to create a single cohesive configuration map to be used by the pool worker, poolboy, and the queue worker.
Link to this section Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
Callback invoked to start the supervisor and during hot code upgrades.
Developers typically invoke Supervisor.init/2 at the end of their
init callback to return the proper supervision flags.
Callback implementation for Supervisor.init/1.
Merge the config and defaults to create a single cohesive configuration map to be used by the pool worker, poolboy, and the queue worker.