Crates.io | percas-client |
lib.rs | percas-client |
version | 0.2.2 |
created_at | 2025-04-16 14:52:25.209954+00 |
updated_at | 2025-09-24 04:28:46.915927+00 |
description | A client for talking to the Percas server |
homepage | |
repository | https://github.com/scopedb/percas/ |
max_upload_size | |
id | 1636540 |
size | 45,286 |
This crate provides a client for interacting with the Percas cache service.
Add percas-client
to your Cargo.toml
:
cargo add percas-client
Create a client instance and connect to the Percas service:
fn main() {
let server_addr = "...";
let factory = ClientFactory::new().unwrap();
let client = factory.make_client(server_addr).unwrap();
runtime.block_on(async move {
let key = "example_key";
let value = "example_value";
client.put(key, value.as_bytes()).await.unwrap();
let value = testkit.client.get(key).await.unwrap().unwrap();
client.delete(key).await.unwrap();
});
}
This work is licensed by Apache License 2.0.