Help us shape the future of Go! Take the 2026 Go Developer Survey

stream

package
v0.31.0 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package stream is the client-facing read side of the plane. Snapshot returns a run's current state from the DataStore; Tail streams its facts live off the bus so a UI can render progress without polling. It declares no subscriptions and opens an ad-hoc subscription per tail.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	// contains filtered or unexported fields
}

Module is the client-facing read side.

func New

func New() *Module

New returns an unmounted stream module. Providers are injected by Mount.

func (*Module) Mount

func (m *Module) Mount(_ context.Context, d module.Deps) error

Mount captures the providers this module uses. Cheap, no I/O.

func (*Module) Name

func (m *Module) Name() string

Name identifies this module.

func (*Module) Snapshot

func (m *Module) Snapshot(ctx context.Context, tenant filament.TenantID, run filament.RunID) (filament.SyncSnapshot, error)

Snapshot returns the run's current persisted state and resource states.

func (*Module) Subscriptions

func (m *Module) Subscriptions() []host.Subscription

Subscriptions returns none; tails are opened per request, not at mount.

func (*Module) Tail

func (m *Module) Tail(ctx context.Context, tenant filament.TenantID, run filament.RunID) (<-chan events.Fact, error)

Tail streams a run's facts live, returning a channel that closes when ctx is cancelled or the subscription drops. Each fact is acked on read, so a slow reader only backpressures the tail, never producers.

Jump to

Keyboard shortcuts

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