1 unstable release
0.1.0 | May 12, 2021 |
---|
#11 in #bb8
160 downloads per month
16KB
145 lines
bb8 connection pool for TiKV client
TiKV client support for the bb8 connection pool.
Usage
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.
lib.rs
:
TiKV support for the bb8
connection pool.
Dependencies
~40–62MB
~1M SLoC