Expand description
Statelet Rust SDK — async gRPC client.
§Example
use statelet_sdk::StateletClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut client = StateletClient::connect("http://127.0.0.1:7379").await?;
// Ping
println!("{}", client.ping().await?);
// KV operations
client.put(b"hello", b"world", None).await?;
if let Some(value) = client.get(b"hello", None).await? {
println!("got: {:?}", value);
}
client.delete(b"hello", None).await?;
Ok(())
}Re-exports§
pub use cdc::CheckpointStore;pub use cdc::CommittedChange;pub use cdc::ConsumeError;pub use cdc::FeedItem;pub use cdc::FeedStream;pub use cdc::FeedTransport;pub use cdc::FileCheckpointStore;pub use cdc::SubscribeCommittedOptions;
Modules§
Structs§
- Graph
Query Options - Out-of-band knobs for
StateletClient::graph_query. The default means “let the gateway decide”: the default graph, no extra row cap, and no temporal filter on either axis. - Graph
Query Result - The projected result set of a
StateletClient::graph_query. - Group
Spec - Result grouping / field-collapse options for
StateletClient::vector_search_grouped(epic #1427). Collapse results to at mostgroup_sizehits per distinct value of the payload fieldfield, returning up togroupsdistinct group keys, ordered by ascending distance. - Grpc
Feed Stream - A live gRPC committed-feed stream, wrapping
tonic::Streaming. - Statelet
Client - Async gRPC client for Statelet.
- Vector
Index Config - HNSW vector index configuration.
- Vector
Search Result - A single nearest-neighbor search result.
Enums§
- Graph
Value - One projected column value.
Jsoncarries the hydratedROLE_NodePropblob for a whole node, verbatim. - WriteOp
- Batch write operation.