Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Influxdb Sdk Laravel Package

corley/influxdb-sdk

View on GitHub
Deep Wiki
Context7
1.0.0

After almost 3 years (first commit by @gianarb on Sep 10, 2014) we finally decided to tag this version as our first stable branch 1.0.0 in order to keep stable our project.

In this release we just seal the base implementation and interfaces.

This project is now tested with the latest InfluxDB 1.2.4 branch

Breaking changes

  • Drop Guzzle 4 support (in favor of PHP 7.1)
0.9.3

Implemented comma, equal sign and space escaping

0.9.2

Fixes minor casing issue on namespace import

0.8.3

Fixes minor casing issue on namespace import

  • PR #66
0.9.1

Just removed Zend Framework library support that is not used anymore in v0.9 as v0.8 and fixes the PHPUnit configuration file with a more clear and usable testsuite configuration

./vendor/bin/phpunit --testsuite unit
./vendor/bin/phpunit --testsuite integration
0.8.2

Just removed Zend Framework library support that is not used anymore in v0.8

0.9.0

In order to supports different database related queries like:

  • create database
  • list database
  • delete database
  • and so on...

We should have to fill the base client InfluxDB\Client with several methods:

public function createDatabase($name) { /* ... */ }
public function deleteDatabase($name) { /* ... */ }
public function getDatabases() { /* ... */ }
public function createRetentionPolicy($name) { /* ... */ }
// ...

As many as InfluxDB prepared queries. Instead of that we drop the database management query from the InfluxDB\Client and add a new layer: InfluxDB\Manager that will support InfluxDB prepared queries.

The manager

$manager = new Manager($client);

The manager accepts any query via callables:

$manager->addQuery("queryName", function($arg1, $arg2) {
    return sprintf("THIS IS MY QUERY WITH: {$arg1} and {$arg2}");
});

// late in your code: 
$manager->queryName(1, 2); // THIS IS MY QUERY WITH: 1 and 2

In order to create and share different database management query, objects can used:

class MyCustomQuery
{
    public function __invoke($arg1, $arg2)
    {
        return sprintf("THIS IS MY QUERY WITH: {$arg1} and {$arg2}");
    }

    public function __toString()
    {
        return "myCustomQuery";
    }
}

// add it
$manager->addQuery(new MyCustomQuery());

// use it
$manager->myCustomQuery(1, 2);
0.8.1

In order to create a better support for database management e custom query support, we deprecate methods:

  • getDatabases
  • createDatabase
  • deleteDatabase

and we will remove those methods in v0.9.0 and we will introduce a manager in order to support those features

$manager->addQuery("getExceptionsInMinutes", function($minutes) {
    return "SELECT * FROM errors WHERE time > now() - {$minutes}m";
});

//late in your code...
$data = $manager->getExceptionsInMinutes(10);
0.8.0

With the 0.7.* version of this library we cannot read and write data using different network adapters. In particular write using UDP/IP and read data back with HTTP. For that reason we move the library removing network adapters and move the project to readers and writers

With this approach you can combine different techniques for reads and writes.

$reader = new Http\Reader($http, $httpOptions);
$writer = new Udp\Writer($udpOptions);
$client = new Client($reader, $writer);

$client->mark(...); // Use UDP/IP support
$client->query("SELECT * FROM my_serie"); // Use HTTP support

BC BREAK

  • Client constructor (Readers and Writers)
0.7.1

New features

  • #56 Added point type hinting (IntType, BoolType, StringType and FloatType)

Improved

  • #57 Simplified library message to InfluxDB line protocol
  • #55 Test this library also against InfluxDB nightly builds
0.7.0

As influxdb now support data type specification for integers, in order to separate those values from float64, this is a very simple solution.

Related to issue #48.

Steps:

  • Added configuration option setForceIntegers
  • Added data type doc
  • Updated influxdb configuration for version 0.9.3
  • Added force integers integration tests
  • Refactored message to line protocol
  • InfluxDB database version as env variable

Refactored message to line protocol functions

Actually the message_to_line_protocol function need the options set. For that reason we have removed the helpers.php functions and moved those utilities int the AdapterAbstract abstract base class.

InfluxDB integration test environment variable

In order to change the InfluxDB version we have prepared an env variable in our Travis-CI configuration file .travis.yml

0.6.3

In order to correctly supports boolean types, the library now will send "true" and "false" to Influxdb.

$client->mark("serie", [
  "is_valid" => true,
  "valve_open" => false,
]);
0.6.2

Release

  • Added tests against different Guzzle Versions (Extended compatibility list)
    • ~4
    • ~5
    • ~6
  • Renamed wrong function prototype: inline protocol to line protocol

BC Breaks

The function message_to_inline_protocol now is renamed to message_to_line_protocol

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
steadrun/laravel-monitor
labyrinthe/connect-laravel
elmogy/layan
drewdan/sentinel-client
dskripchenko/laravel-llm
fatryst/nuonuo
stevenay/myanfont
gmostafa/php-graphql-client
xeviant/paystack
snowsoft/faker
meditationsteps/blogetc
animalyoung/laravel-influxdb
onix-solutions/sms-telera
lonely-lights/prosetta
oxygen/data
oxygen/core
jengo/base
xiloryx/log-collector
a21ns1g4ts/filament-stripe
la-php/laravel-admin