Skip to main content

Module ws

Module ws 

Source
Expand description

WebSocket handler and watch subscription manager.

This module provides two major components:

  1. WatchManager — a thread-safe subscription registry that manages watch lifecycles (subscribe, poll, unsubscribe, add/remove IDs).

  2. ws_handler — an Axum WebSocket upgrade endpoint (GET /api/ws) that handles Haystack watch operations over JSON messages.

Structs§

WatchManager
Manages watch subscriptions for change polling.

Functions§

ws_handler
WebSocket upgrade handler for /api/ws.