nat.front_ends.fastapi.routes.websocket#

WebSocket route registration.

Attributes#

Functions#

websocket_endpoint(*, worker, session_manager)

Build websocket endpoint handler with auth-flow integration.

add_websocket_routes(worker, app, endpoint, ...)

Add websocket route for an endpoint.

Module Contents#

logger#
_SAFE_SESSION_ID_RE#
websocket_endpoint(
*,
worker: Any,
session_manager: nat.runtime.session.SessionManager,
)#

Build websocket endpoint handler with auth-flow integration.

async add_websocket_routes(
worker: Any,
app: fastapi.FastAPI,
endpoint: Any,
session_manager: nat.runtime.session.SessionManager,
)#

Add websocket route for an endpoint.