InfluxWriter
InfluxWriter batches points and writes them to influxdb.
Constructor Summary
| Public Constructor | ||
| public |
constructor(options: *) |
|
Member Summary
| Private Members | ||
| private |
_batcher: module.Batcher |
|
| private |
Influx will overwrite points using the same timestamp and tags. |
|
| private |
_influx: InfluxDB |
|
| private |
|
|
Method Summary
| Public Methods | ||
| public |
writePoint(measurement: string, tags: Record, fields: Record, time: undefined) Add a point to the current batch. |
|
| Private Methods | ||
| private |
async _flushBatch(batch: undefined): Promise Flush a batch to InfluxDB. |
|
Public Constructors
public constructor(options: *) source
Params:
| Name | Type | Attribute | Description |
| options | * |
Private Members
private _batcher: module.Batcher source
private _counter: number source
Influx will overwrite points using the same timestamp and tags. To work around this we use this _counter field as the nanosecond segment of the timestamp and increment it every time a point is written. This way it is extremely unlikely that any points are overwritten.
