Skip to content

StreamSession

Defined in: src/client/types.ts:67

A live streaming method call. Exchange methods drive the server with StreamSession.exchange; producer methods are consumed by async iteration. Always StreamSession.close when done.

readonly header: Record<string, any> | null;

Defined in: src/client/types.ts:69

The method’s header row (returned once at stream start), or null if the method declares no header.

asyncIterator: AsyncIterableIterator<Record<string, any>[]>;

Defined in: src/client/types.ts:76

Iterate the server-produced output batches one row-array at a time (producer streams).

AsyncIterableIterator<Record<string, any>[]>


close(): void;

Defined in: src/client/types.ts:78

Tear down the stream, flushing/draining the underlying transport.

void


exchange(input): Promise<Record<string, any>[]>;

Defined in: src/client/types.ts:71

Send one batch of input rows and receive the server’s corresponding output rows (exchange streams).

Parameter Type
input ExchangeInput

Promise<Record<string, any>[]>


tick(metadata?): Promise<Record<string, any>[]>;

Defined in: src/client/types.ts:74

Send one producer tick with optional application custom metadata and return the rows emitted for that tick.

Parameter Type
metadata? ReadonlyMap<string, string>

Promise<Record<string, any>[]>