class

Flux::Client

Inherits Reference < Object

Constants

Log = ::Log.for(self)

Constructors

new(uri : String, token : String, org : String)

Creates a new InfluxDB client for the instance running at the specified uri.

token must be a valid API token on the instance that provides sufficient privaleges for the buckets being interact with. Similarly org must match the appropriate org name these buckets sit under.

Source

Instance methods

query(expression : String)

Runs a query on the connected InfluxDB instance.

expression must be a valid Flux expression. All returned records will by a Hash of String => String. To parse into stricter types, use variant of this method accepting a block.

Source
query(expression : String, &block : QueryResult::Row, Array(QueryResult::Column) -> T) forall T

Runs a query on the connected InfluxDB instance.

expression must be a valid Flux expression.

Source
write(bucket : String, point : Point)

Perform a synchronous write of a single point to the passed bucket.

In most cases this should not be used due the associated request overhead. When writing points intermittently a Writer can be used to provide buffering and batching.

Source
write(bucket : String, points : Enumerable(Point))

Perform a synchronous write of a set of points to the passed bucket.

Source