rsolomo / influent.rs

InfluxDB Rust driver

Home Page:http://gobwas.github.io/influent.rs/influent/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

influent.rs

Build Status crates.io

InfluxDB rust package

Overview

This is an InfluxDB driver for Rust.

Install

Cargo.toml

[dependencies]
influent = "0.2"

Usage

use influent::create_client;
use influent::client::Credentials;
use influent::measurement::{Measurement, Value};

// prepare client
let credentials = Credentials {
    username: "gobwas",
    password: "xxx",
    database: "mydb"
};
let hosts = vec!["http://localhost:8086"];
let client = create_client(credentials, hosts);

// prepare measurement
let mut measurement = Measurement::new("key");
measurement.add_field("some_field", Value::String("hello"));
measurement.add_tag("some_region", "Moscow");

client.write_one(measurement, None);

Documentation

API documentation placed here.

Compatibility

This is a table of InfluxDB write spec compatibility respectively to Influent version:

InfluxDB Influent
0.9.2 ^0.1.0
0.9.3 ^0.2.0

License

MIT © Sergey Kamardin

About

InfluxDB Rust driver

http://gobwas.github.io/influent.rs/influent/index.html


Languages

Language:Rust 100.0%