MCPcopy Create free account
hub / github.com/PerpetualSoftware/pad / SetWatchEventsBus

Method SetWatchEventsBus

internal/server/server.go:1294–1296  ·  view source on GitHub ↗

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)

Source from the content-addressed store, hash-verified

1292// by the stream handler, so a server constructed without one (e.g. a test
1293// that doesn't exercise watches) still serves every other endpoint.
1294func (s *Server) SetWatchEventsBus(bus watchevents.Bus) {
1295 s.watchEvents = bus
1296}
1297
1298// SetSessionPresence attaches the live-session registry read by
1299// GET /api/v1/sessions and written by GET /api/v1/events/stream

Calls

no outgoing calls