bb8-tivk

Crates.iobb8-tivk
lib.rsbb8-tivk
version0.0.99
sourcesrc
created_at2021-05-12 07:35:44.286354
updated_at2021-05-12 07:35:44.286354
descriptionbb8 adapter for TiKV client
homepage
repositoryhttps://github.com/shenek/bb8-tikv
max_upload_size
id396435
size57,687
Stepan Henek (shenek)

documentation

README

Security audit Code Quality License: MIT

bb8 connection pool for TiKV client

TiKV client support for the bb8 connection pool.

Usage

use bb8::Pool;
use bb8_tivk::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.

Commit count: 13

cargo fmt