Reference in New Issue
Block a user
Delete Branch "feat-38-39-sse-server-mode"
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
Adds two tightly coupled features:
GET /api/events) — live mutation notifications for connected clientsnormal,read-only,degradedmodes exposed via health endpoints and SSENew Components
SSE Broker (
broker.go)Last-Event-IDreconnection replayatomic.Uint64Server State (
servermode.go)normal→read-only(explicit) /degraded(MinIO unreachable)Storage.Ping()methodSIGUSR1toggles read-only mode at runtimeread_only: trueconfig option for startupserver.stateSSE eventsSSE Handler (
sse_handler.go)http.ResponseController.SetWriteDeadline(time.Time{})to disable the 15s WriteTimeout for SSE connections onlyX-Accel-Buffering: nofor nginx compatibilityLast-Event-IDheaderserver.stateevent on connectEvent Types
item.createditem.updateditem.deletedrevision.createdserver.stateheartbeatOther Changes
/health: now returnsmodefield/ready: now returnsmode,sse_clients, and real MinIO connectivity checkRequireWritablemiddleware: returns 503 on all write endpoints when read-onlyCloses #38, closes #39