Crates.io | bb8-tikv |
lib.rs | bb8-tikv |
version | 0.1.0 |
source | src |
created_at | 2021-05-12 18:55:22.654292 |
updated_at | 2021-05-12 18:55:22.654292 |
description | bb8 adapter for TiKV client |
homepage | |
repository | https://github.com/shenek/bb8-tikv |
max_upload_size | |
id | 396620 |
size | 57,743 |
TiKV client support for the bb8 connection pool.
use bb8::Pool;
use bb8_tikv::TiKVRawConnectionManager;
async fn execute() {
let pd_servers: Vec<String> = vec!["127.0.0.1:2379".into()];
let manager = TiKVRawConnectionManager::new(pd_servers, None).unwrap();
let pool = Pool::builder().max_size(10).build(manager).await.unwrap();
let client = pool.get().await.unwrap();
client
.put("TEST".to_string(), b"111".to_vec())
.await
.unwrap();
}
For details how to use the client see TiKV client.