Crates.io | influent |
lib.rs | influent |
version | 0.5.3 |
source | src |
created_at | 2015-08-30 22:13:33.732411 |
updated_at | 2020-04-19 10:44:32.540137 |
description | InfluxDB Rust driver |
homepage | |
repository | https://github.com/gobwas/influent.rs |
max_upload_size | |
id | 2967 |
size | 26,636 |
InfluxDB Rust package
This is an InfluxDB driver for Rust.
Library is not under active development right now.
PRs are welcome and merged from time to time. If you want to become a collaborator of this library please let me know.
Cargo.toml
[dependencies]
influent = "0.5"
extern crate influent;
use influent::create_client;
use influent::client::{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);
API documentation placed here.
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
MIT © Sergey Kamardin