synap_sdk/lib.rs
1//! # Synap Rust SDK
2//!
3//! Official Rust client for Synap - High-Performance In-Memory Key-Value Store & Message Broker
4//!
5//! ## Features
6//!
7//! - 💾 **Key-Value Store**: Fast in-memory KV operations with TTL support
8//! - 📨 **Message Queues**: RabbitMQ-style queues with ACK/NACK
9//! - 📡 **Event Streams**: Kafka-style event streams with offset tracking
10//! - 🔔 **Pub/Sub**: Topic-based publish/subscribe with wildcards
11//! - 🔄 **Async/Await**: Built on Tokio for high-performance async I/O
12//! - 🛡️ **Type-Safe**: Leverages Rust's type system for correctness
13//!
14//! ## Quick Start
15//!
16//! ```rust,no_run
17//! use synap_sdk::{SynapClient, SynapConfig};
18//!
19//! #[tokio::main]
20//! async fn main() -> Result<(), Box<dyn std::error::Error>> {
21//! // Create client
22//! let config = SynapConfig::new("http://localhost:15500");
23//! let client = SynapClient::new(config)?;
24//!
25//! // Key-Value operations
26//! client.kv().set("user:1", "John Doe", None).await?;
27//! let value: Option<String> = client.kv().get("user:1").await?;
28//! println!("Value: {:?}", value);
29//!
30//! Ok(())
31//! }
32//! ```
33
34pub mod client;
35pub mod error;
36pub mod kv;
37pub mod pubsub;
38pub mod queue;
39mod queue_reactive;
40pub mod reactive;
41pub mod rx; // RxJS-style reactive programming
42pub mod stream;
43mod stream_reactive;
44pub mod types;
45
46pub use client::{SynapClient, SynapConfig};
47pub use error::{Result, SynapError};
48pub use kv::KVStore;
49pub use pubsub::PubSubManager;
50pub use queue::QueueManager;
51pub use reactive::{MessageStream, SubscriptionHandle};
52pub use stream::StreamManager;