Expand description
Genesis DB Client SDK for Rust
This crate provides a client for interacting with Genesis DB, an event sourcing database.
§Example
use genesisdb_io_client::{Client, ClientConfig};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = Client::new(ClientConfig {
api_url: "http://localhost:8080".to_string(),
api_version: "v1".to_string(),
auth_token: "your-token".to_string(),
})?;
// Ping the server
let response = client.ping().await?;
println!("Ping response: {}", response);
Ok(())
}Structs§
- Client
- Genesis DB client
- Client
Config - Configuration for the Genesis DB client
- Cloud
Event - A CloudEvent as used by Genesis DB
- Commit
Event - Event to be committed to Genesis DB
- Commit
Event Options - Options for committing an event
- Precondition
- Precondition for committing events
- Stream
Options - Options for streaming events
Enums§
- Error
- Errors that can occur when using the Genesis DB client
Type Aliases§
- Result
- Result type for Genesis DB client operations