SetWatchEventsBus attaches the watch/nudge notification bus consumed by GET /api/v1/events/stream (TASK-2533). Nil-checked by every producer and by the stream handler, so a server constructed without one (e.g. a test that doesn't exercise watches) still serves every other endpoint.
(bus watchevents.Bus)
| 846 | // by the stream handler, so a server constructed without one (e.g. a test |
| 847 | // that doesn't exercise watches) still serves every other endpoint. |
| 848 | func (s *Server) SetWatchEventsBus(bus watchevents.Bus) { |
| 849 | s.watchEvents = bus |
| 850 | } |
| 851 | |
| 852 | // SetSessionPresence attaches the live-session registry read by |
| 853 | // GET /api/v1/sessions and written by GET /api/v1/events/stream |
no outgoing calls