InfluxDB PHP Client
Public Member Functions | List of all members
InfluxDB2\Writer Interface Reference
Inheritance diagram for InfluxDB2\Writer:
InfluxDB2\UdpWriter InfluxDB2\WriteApi

Public Member Functions

 write ($data)
 

Member Function Documentation

◆ write()

InfluxDB2\Writer::write (   $data)

Write data

Example write data in array $writeApi->write([ ['name' => 'cpu','tags' => ['host' => 'server_nl', 'region' => 'us'], 'fields' => ['internal' => 5, 'external' => 6], 'time' => 1422568543702900257], ['name' => 'gpu', 'fields' => ['value' => 0.9999]]], WritePrecision::NS, 'my-bucket', 'my-org' )

Example write data in line protocol $writeApi->write('h2o,location=west value=33i 15')

Example write data using Point structure $point = new Point("h2o).

Parameters
string | Point | array$dataDataPoints to write into InfluxDB. The data could be represent by array, Point, string
Exceptions

Throwable

Implemented in InfluxDB2\UdpWriter.


The documentation for this interface was generated from the following file: