bridge

package
v0.0.0-...-4afd048 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 8, 2026 License: MIT Imports: 7 Imported by: 0

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

func ExecutionRoom

func ExecutionRoom(instanceID string, executionID core.ID) string

ExecutionRoom returns the WebSocket room address for an execution. The name is defined by the shared wire protocol so client and server agree.

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL