Expand description
Commy Rust Client SDK
A high-level Rust client for interacting with the Commy shared memory coordination system.
§Features
- WebSocket Secure (WSS) client for remote connections
- Direct memory-mapping support for local processes
- Automatic connection management with reconnection
- Full async/await support with Tokio
- Multiple authentication methods
§Example
use commy_sdk_rust::{Client, auth};
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
// Create a new client
let client = Client::new("wss://localhost:9000");
// Connect to server
client.connect().await?;
// Authenticate with a tenant
client.authenticate("my_tenant", auth::api_key("api_key_value".to_string())).await?;
// Create or get a service
let _service = client.get_service("my_tenant", "config").await?;
Ok(())
}Re-exports§
pub use client::Client;pub use error::CommyError;pub use error::Result;pub use examples_support::CommyServer;pub use examples_support::ServerConfig;pub use message::ClientMessage;pub use message::ServerMessage;pub use service::Service;
Modules§
- auth
- Authentication utilities
- client
- Main Commy client for connecting to servers
- connection
- WebSocket connection management
- error
- Error types for Commy client SDK
- examples_
support - file_
accessor - File accessor abstraction for local and remote variable files
- message
- Message types for Commy client protocol
- service
- Service abstraction for remote data access
- state
- Client state management
- virtual_
file - Virtual variable file abstraction
- watcher
- File watcher and change detection engine
Constants§
- VERSION
- Library version