feat: add server-sent events endpoint for live updates #38
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The spec lists
/healthand/readybut no push mechanism. Thesilo-modclient expects a live feed for real-time database activity updates (visible in the Selection View's "Database Activity" section).Recommendation: SSE over WebSocket
SSE (
text/event-stream) is simpler to implement in Go, works through nginx without upgrade headers, and matches the use case (server → client unidirectional push). WebSocket adds complexity for no benefit unless bidirectional communication is needed later.Proposed endpoint
Event types
Server implementation notes
http.Flusherinterface for SSE streaming/readyreportingLast-Event-IDheader for reconnectionnginx config
Acceptance criteria
GET /api/eventsstreams SSE with auth (viewer+)/readyreports connected SSE client countLast-Event-IDreconnection support