RpcClient
Defined in: src/client/connect.ts:30
A connected RPC client, returned by httpConnect, pipeConnect, and subprocessConnect.
Methods
Section titled “Methods”call()
Section titled “call()”call(method, params?): Promise<Record<string, any> | null>;Defined in: src/client/connect.ts:32
Invoke a unary method. Returns the single result row, or null for void methods. Parameter defaults from __describe__ are applied automatically.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
method | string |
params? | Record<string, any> |
Returns
Section titled “Returns”Promise<Record<string, any> | null>
close()
Section titled “close()”close(): void;Defined in: src/client/connect.ts:38
Release transport resources; for subprocess clients this also terminates the child process.
Returns
Section titled “Returns”void
describe()
Section titled “describe()”describe(): Promise<ServiceDescription>;Defined in: src/client/connect.ts:36
Fetch the server’s method/protocol description (cached after the first call).
Returns
Section titled “Returns”Promise<ServiceDescription>
stream()
Section titled “stream()”stream(method, params?): Promise<StreamSession>;Defined in: src/client/connect.ts:34
Open a streaming method, returning a StreamSession for exchange or producer iteration.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
method | string |
params? | Record<string, any> |
Returns
Section titled “Returns”Promise<StreamSession>