//! Embedded SSE and WebSocket hub with topic-based pub/sub, authorization,
//! cross-instance Redis relay, and connection lifecycle management.
#![allow(dead_code)]

pub mod auth;
pub mod hub;
pub mod message;
pub mod sse;
pub mod stats;
pub mod topic;
pub mod ws;

#[cfg(feature = "redis")]
pub mod redis_relay;

// Re-exports for convenient access
pub use auth::{AuthContext, AuthRule, Policy, TopicAuth};
pub use hub::{BextHub, HubConfig, HubStatsSnapshot, Subscriber};
pub use message::{ClientMessage, HubEvent, ServerMessage};
pub use sse::SseStream;
pub use stats::{format_json, format_prometheus};
pub use topic::{TopicFilter, TopicMatcher};
pub use ws::{WsSession, WsSessionConfig};

#[cfg(feature = "redis")]
pub use redis_relay::RedisRelay;
