envoy/http/mod.rs
1//! HTTP routing, middleware, handlers, and WebSocket support for Envoy.
2//!
3//! Split from the monolithic `http.rs` (1968 LOC) into focused modules:
4//! - `state` — shared application state (`AppState`, `SharedState`, `WsRegistry`)
5//! - `middleware` — rate limiting and auth middleware
6//! - `router` — route table construction (`build_router`, `build_router_unlimited`)
7//! - `types` — request/response structs
8//! - `handlers` — HTTP handler functions
9//! - `ws` — WebSocket handler and broadcast logic
10
11pub mod handlers;
12pub mod middleware;
13pub mod router;
14pub mod state;
15pub mod types;
16pub mod ws;
17
18// Re-export the public API surface so existing callers
19// (`server.rs`, `lib.rs`, tests) continue to work unchanged.
20pub use router::{build_router, build_router_unlimited};
21pub use state::{run_nudge_loop, AppState, SharedState};
22pub use types::{
23 CreateDependencyRequest, HealthResponse, PollQuery, PollResponse, RegisterRequest,
24 SendMessageRequest, StatsResponse,
25};