Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Influx ¶
type Influx struct {
// contains filtered or unexported fields
}
Influx represents and influxdb that we can write points to
func (*Influx) WritePoints ¶ added in v0.0.23
func (i *Influx) WritePoints(points []InfluxPoint) error
WritePoints to influxdb
type InfluxPoint ¶ added in v0.0.12
type InfluxPoint struct {
// Type of point (voltage, current, key, etc)
Type string `influx:"type,tag"`
// ID of the sensor that provided the point
ID string `influx:"id,tag"`
// DeviceID of the ID of the device that provided the point
DeviceID string `influx:"deviceId,tag"`
// Average OR
// Instantaneous analog or digital value of the point.
// 0 and 1 are used to represent digital values
Value float64 `influx:"value"`
// statistical values that may be calculated
Min float64 `influx:"min"`
Max float64 `influx:"max"`
// Time the point was taken
Time time.Time `influx:"time"`
// Duration over which the point was taken
Duration time.Duration `influx:"duration"`
}
InfluxPoint represents a point that is written into influxdb
func PointToInfluxPoint ¶ added in v0.0.12
func PointToInfluxPoint(deviceID string, p data.Point) InfluxPoint
PointToInfluxPoint converts a point to influx point
Click to show internal directories.
Click to hide internal directories.