struct Flux::Point

Overview

Model for InfluxDB data points.

TODO make this generic over a NamedTuple of the associated fields. Currently this causes issues elsewhere as you can not have an Array, Channel etc of a generic type.

Defined in:

flux/point.cr

Constructors

Class Method Summary

Instance Method Summary

Constructor Detail

def self.new(measurement, timestamp = nil, tags = nil, **fields : **T) forall T #

Creates a new data point that can be serialized for entry to InfluxDB.


[View source]

Class Method Detail

def self.new!(measurement, timestamp = nil, tags = nil, **fields : **T) forall T #

Creates a point from a set of nilable fields, discarding any that are nil.


[View source]

Instance Method Detail

def fields : FieldSet #

[View source]
def measurement : String #

[View source]
def tag(**tags : **T) forall T #

Append or change tags associated with the point.


[View source]
def tagged? #

Checks if any tags are defined for the point.


[View source]
def tags #

[View source]
def timestamp : Time | Nil #

[View source]
def to_s(io) #

[View source]