pub struct SharedState {
pub started_at: Instant,
pub seen_ids: Arc<Mutex<HashSet<String>>>,
pub maps: Arc<RwLock<HashMap<String, SiteMap>>>,
pub sessions: Arc<RwLock<HashMap<String, HttpSession>>>,
pub mapper: Option<Arc<Mapper>>,
pub renderer: Option<Arc<dyn Renderer>>,
pub event_bus: Arc<EventBus>,
}Expand description
Shared state passed to connection handlers.
Made public so the REST API module can share the same dispatch state.
Fields§
§started_at: Instant§seen_ids: Arc<Mutex<HashSet<String>>>§maps: Arc<RwLock<HashMap<String, SiteMap>>>§sessions: Arc<RwLock<HashMap<String, HttpSession>>>Authenticated sessions keyed by session_id.
mapper: Option<Arc<Mapper>>§renderer: Option<Arc<dyn Renderer>>§event_bus: Arc<EventBus>Global event bus for real-time telemetry. All components emit events here; consumers (SSE, MCP, dashboard, logs) subscribe independently.
Auto Trait Implementations§
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more