Expand description
WebSocket hub for real-time event streaming.
Provides a /api/ws endpoint that streams server events to dashboard clients
via a tokio::sync::broadcast channel.
Supports two authentication methods:
- Query parameter:
?token=<api_token>(Tauri/API clients) - Session cookie:
tuitbot_session=<token>(web/LAN clients)
Structs§
- Account
WsEvent - Wrapper that tags every
WsEventwith the originating account. - WsQuery
- Query parameters for WebSocket authentication.
Enums§
- WsEvent
- Events pushed to WebSocket clients.
Functions§
- ws_
handler GET /api/ws— WebSocket upgrade with token or cookie auth.