ex_flux v0.2.0 ExFlux.Database.PoolWorker View Source

A single worker responsible for sending stats to the configured database

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor.

single pool worker initialization with deferred UDP socket setup

Given an identified worker via worker_pid/1 and points, asynchronously ship the points to influx.

Perform a non-blocking checkout of an available worker for sending data. If no worker is available, :poolboy.checkout/2 will return :full

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

single pool worker initialization with deferred UDP socket setup

Link to this function

send_points(pid, points)

View Source
send_points(pid(), points :: [map() | ExFlux.Point.t()]) :: :ok

Given an identified worker via worker_pid/1 and points, asynchronously ship the points to influx.

Link to this function

worker_pid(database)

View Source
worker_pid(database :: String.t()) :: pid() | :full

Perform a non-blocking checkout of an available worker for sending data. If no worker is available, :poolboy.checkout/2 will return :full