https://github.com/bwolf/r2d2-influx_db_client
influx_db_client support library for the r2d2 connection pool.
https://github.com/bwolf/r2d2-influx_db_client
Last synced: 10 months ago
JSON representation
influx_db_client support library for the r2d2 connection pool.
- Host: GitHub
- URL: https://github.com/bwolf/r2d2-influx_db_client
- Owner: bwolf
- License: mit
- Created: 2019-09-02T18:51:29.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2019-09-02T19:10:27.000Z (almost 7 years ago)
- Last Synced: 2025-07-23T05:43:12.144Z (11 months ago)
- Language: Rust
- Size: 3.91 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# r2d2-influx_db_client [![Latest Version]][crates.io]
[Latest Version]: https://meritbadge.herokuapp.com/r2d2-influx_db_client
[crates.io]: https://crates.io/crates/r2d2-influx_db_client
[influx_db_client][influx_db_client] support library for the [r2d2][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
```rust
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...
}
```
[r2d2]: https://github.com/sfackler/r2d2
[influx_db_client]: https://github.com/driftluo/InfluxDBClient-rs]