Crates.io | oomclient |
lib.rs | oomclient |
version | 0.1.1-rc.0 |
source | src |
created_at | 2022-01-19 05:59:26.325955 |
updated_at | 2022-02-18 08:08:55.340593 |
description | oomstore client for rust |
homepage | https://github.com/oom-ai/oomstore/tree/main/sdk/rust |
repository | https://github.com/oom-ai/oomstore/tree/main/sdk/rust |
max_upload_size | |
id | 516546 |
size | 62,276 |
This crate provides an easy-to-use async rust client for OomStore, a lightweight and fast feature store powered by go. It uses gRPC protocol to communicate with the oomagent server under the hood.
use oomclient::Client;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = Client::with_default_embedded_oomagent().await?;
let features = vec!["account.state".into(), "txn_stats.count_7d".into()];
let response = client.online_get_raw("48", features.clone()).await?;
println!("RESPONSE={:#?}", response);
let response = client.online_get("48", features).await?;
println!("RESPONSE={:#?}", response);
Ok(())
}
More examples can be found in examples
directory of the project repo.
Note
You need to install the oomagent first following the guide.
Install cargo-make and run cargo make
.
Apache-2.0