Crates.io | r2d2-influx_db_client |
lib.rs | r2d2-influx_db_client |
version | 0.1.1 |
source | src |
created_at | 2019-09-02 19:02:36.047473 |
updated_at | 2019-09-02 19:10:59.236748 |
description | InfluxDB support for the R2D2 connection pool. |
homepage | |
repository | https://github.com/bwolf/r2d2-influx_db_client.git |
max_upload_size | |
id | 161639 |
size | 7,482 |
influx_db_client support library for the r2d2 connection pool.
Add to Cargo.toml
:
influx_db_client = "0.3.6"
r2d2 = "0.8"
r2d2-influx_db_client = "0.1.0"
use std::time::Duration;
use r2d2_influx_db_client::{Authentication, InfluxDbConnectionManager};
fn main() {
let con_mgr = InfluxDbConnectionManager::new("localhost", 8086, "tutorial");
let pool = r2d2::Pool::builder()
.connection_timeout(Duration::from_secs(1))
.test_on_check_out(true)
.max_size(15)
.build(connection_manager)
.expect("Pool");
// Use pool...
}