Skip to content

influx_db_client support library for the r2d2 connection pool.

License

Notifications You must be signed in to change notification settings

bwolf/r2d2-influx_db_client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

r2d2-influx_db_client   Latest Version

influx_db_client support library for the r2d2 connection pool.

Install

Add to Cargo.toml:

influx_db_client = "0.3.6"
r2d2 = "0.8"
r2d2-influx_db_client = "0.1.0"

Example

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...
}

About

influx_db_client support library for the r2d2 connection pool.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages