Skip to content

HttpRpcClient

Defined in: src/client/connect.ts:43

An HTTP-connected RPC client: RpcClient plus the HTTP-only continuation-resume surface.

call(method, params?): Promise<Record<string, any> | null>;

Defined in: src/client/connect.ts:33

Invoke a unary method. Returns the single result row, or null for void methods. Parameter defaults from __describe__ are applied automatically.

Parameter Type
method string
params? Record<string, any>

Promise<Record<string, any> | null>

RpcClient.call


close(): void;

Defined in: src/client/connect.ts:39

Release transport resources; for subprocess clients this also terminates the child process.

void

RpcClient.close


describe(): Promise<ServiceDescription>;

Defined in: src/client/connect.ts:37

Fetch the server’s method/protocol description (cached after the first call).

Promise<ServiceDescription>

RpcClient.describe


resumeStream(
method,
token,
outputSchema?): Promise<HttpStreamSession>;

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

Resume a producer stream from a continuation token without re-binding.

A continuation request (POST /{method}/exchange carrying only the STATE_KEY token) is fully self-describing: the server recovers the producer state, schemas, and function identity from the signed token alone, so no bind/init round-trip is needed. This is the cheap path for a stateless relay that holds a per-batch token (see HttpStreamSession.nextWithToken) and resumes on any connection/node — unlike stream(...) which would produce and discard a fresh first turn before seeking.

token is the opaque blob from HttpStreamSession.nextWithToken, which packs both the cursor and the call token; the resuming node may never have seen this stream’s /init, so it needs both.

The returned session is positioned at token; the first nextWithToken() (or iteration) issues the continuation. outputSchema is unused on the producer-continuation path (each response’s IPC stream carries its own schema) and defaults to the empty schema.

Mirrors Python’s _HttpProxy.resume_stream.

Parameter Type
method string
token string
outputSchema? Schema<any>

Promise<HttpStreamSession>


stream(method, params?): Promise<HttpStreamSession>;

Defined in: src/client/connect.ts:45

Open a streaming method, returning an HttpStreamSession for exchange or producer iteration.

Parameter Type
method string
params? Record<string, any>

Promise<HttpStreamSession>

RpcClient.stream