Skip to content

PersistentAI API Documentation / @persistentai/fireflow-types / pumpDBOSStreamToChannel

Function: pumpDBOSStreamToChannel()

pumpDBOSStreamToChannel<T>(dbosStream, channel): Promise<void>

Defined in: packages/fireflow-types/src/flow/execution/runtime/stream-bridge.ts:139

Pump all data from a DBOS stream into a MultiChannel. Runs at WORKFLOW level (not inside a step) because readStream is a workflow-level operation.

Iterates the DBOS stream (async iterable from readStream) until the stream is closed by the writer. Each item is forwarded to the local MultiChannel. When the DBOS stream ends, the local channel is closed.

Type Parameters

T

T

Parameters

dbosStream

AsyncIterable<T>

The async iterable from dbos.readStream()

channel

MultiChannel<T>

The local MultiChannel to write to

Returns

Promise<void>

Licensed under BUSL-1.1