//! Stateless gateway for routing client requests to shards.
//!
//! The gateway is a lightweight HTTP router that:
//!
//! - Routes assertions to the correct shard based on subject hash
//! - Forwards writes to shard leaders
//! - Load balances reads across replicas
//! - Provides cluster health endpoints
//!
//! # Architecture
//!
//! ```text
//! [Client] ---> [Gateway] ---> [Shard Leader] ---> [Followers]
//!                  |
//!                  v
//!              [RangeRouter] (subject -> shard -> nodes)
//! ```
//!
//! # Usage
//!
//! ```ignore
//! use stemedb_cluster::gateway::Gateway;
//!
//! let gateway = Gateway::new(router, membership, rpc_pool);
//! let app = gateway.router();
//!
//! axum::serve(listener, app).await?;
//! ```

mod handlers;
mod service;

pub use service::{Gateway, GatewayBuilder};
