Skip to content

ServeStreamOptions

Defined in: src/serve-stream.ts:19

Options for serveStream — a single RPC session over one stream pair.

readable: ReadableStream<Uint8Array<ArrayBufferLike>> | ReadableStream;

Defined in: src/serve-stream.ts:22

Incoming request bytes — a web ReadableStream<Uint8Array> or a Node Readable (e.g. a Duplex bridging a MessagePort).


optional serverOptions?: object;

Defined in: src/serve-stream.ts:27

Passed through to the VgiRpcServer constructor (describe, hooks, …).

optional dispatchHook?: DispatchHook;

Hook invoked around each dispatched request (tracing/metrics/auth enrichment).

optional enableDescribe?: boolean;

Enable the describe RPC method (service self-description). Default true.

optional externalLocation?: ExternalLocationConfig;

Configuration for externalizing oversized record batches to blob storage.

optional onServeStart?: ServeStartHook;

Lifecycle hook fired once before the first dispatched request.

optional protocolVersion?: string;

Protocol version string reported in the service description.

optional serverId?: string;

Opaque per-process server identifier surfaced to clients and the landing page.


optional transportKind?: TransportKind;

Defined in: src/serve-stream.ts:29

Reported to the on_serve_start hook. Defaults to PIPE.


optional writable?: number | Socket | ByteSink;

Defined in: src/serve-stream.ts:25

Outgoing response sink — a stdout-like fd number, or a net.Socket / structurally-compatible Duplex. Omit for the stdout fd.