Documentation
¶
Overview ¶
Package bridge connects the WebSocket transport to per-instance execution event streams. It implements the websocket.RoomProvider contract so that a client subscribing to an execution room receives an ordered history-plus-live event stream, mirroring the SSE event endpoint over WebSocket.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type EventBridge ¶
type EventBridge struct {
// contains filtered or unexported fields
}
EventBridge resolves execution rooms to per-subscriber event streams. It is instantiated once per API server and is stateless between subscriptions.
func New ¶
func New(instances *instance.Manager) *EventBridge
New creates an EventBridge backed by the live instance manager.
func (*EventBridge) Stream ¶
func (b *EventBridge) Stream(ctx context.Context, room string) (<-chan protocol.StreamEvent, error)
Stream returns an ordered stream of execution events (persisted history followed by live bus events) for the execution addressed by room. Each subscriber receives an independent stream with exactly-once semantics. The returned channel is closed when ctx ends or the execution stream ends.