fetch_ml/internal/api/ws
Jeremie Fraeys 188cf55939
refactor(api): overhaul WebSocket handler and protocol layer
Major WebSocket handler refactor:
- Rewrite ws/handler.go with structured message routing and backpressure
- Add connection lifecycle management with heartbeats and timeouts
- Implement graceful connection draining for zero-downtime restarts

Protocol improvements:
- Define structured protocol types in protocol.go for hub communication
- Add versioned message envelopes for backward compatibility
- Standardize error codes and response formats across WebSocket API

Job streaming via WebSocket:
- Simplify ws/jobs.go with async job status streaming
- Add compression for high-volume job updates

Testing:
- Update websocket_e2e_test.go for new protocol semantics
- Add connection resilience tests
2026-03-12 12:01:21 -04:00
..
handler.go refactor(api): overhaul WebSocket handler and protocol layer 2026-03-12 12:01:21 -04:00
jobs.go refactor(api): overhaul WebSocket handler and protocol layer 2026-03-12 12:01:21 -04:00
validate.go feat(api): integrate scheduler protocol and WebSocket enhancements 2026-02-26 12:05:57 -05:00