Download the PHP package stefanotorresi/influxdb-php-async without Composer
On this page you can find all versions of the php package stefanotorresi/influxdb-php-async. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download stefanotorresi/influxdb-php-async
More information about stefanotorresi/influxdb-php-async
Files in stefanotorresi/influxdb-php-async
Package influxdb-php-async
Short Description Async PHP client for InfluxDB
License MIT
Informations about the package influxdb-php-async
InfluxDB PHP Async
An asyncronous client for InfluxDB, implemented via ReactPHP.
Installation
Use Composer
composer require stefanotorresi/influxdb-php-async
Usage
Each client implementation exposes three main methods:
The default implementation uses Buzz React and we'll use it throughout the rest of this document.
Here is a basic usage example where we first create a database, then write a line to it:
Note that you need to run the ReactPHP event loop. If you don't inject your own, a default loop is composed by the client, and can be started via the run
method.
This API assumes that you're familiar with ReactPHP promises.
Configuration
These are the default options:
You can change them at instantion time, defaults will be merged with the one passed:
For details about the socket_options
key, please refer to react/socket documentation.
Future developments / TO-DO list
- An UDP client implemented with react/datagram.
- A QueryBuilder, possibly identical to the one in the official influxdb-php client.
- A set of response decoders that convert the JSON body from PSR-7 Responses to something more readily consumable.
- Explore the possibility of merging this package into the official sdk.
License
This package is released under the MIT license.