Skip to content

VgiRpcServerOptions

Defined in: src/server.ts:58

Options for VgiRpcServer.

optional dispatchHook?: DispatchHook;

Defined in: src/server.ts:69

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


optional enableDescribe?: boolean;

Defined in: src/server.ts:65

Host vgi_rpc.Reflection.v1. Default true.

Named for the __describe__ method it used to switch on, and kept under that name across the fleet: what it gates is introspection, and introspection is now a co-hosted protocol rather than a reserved method answered before dispatch.


optional externalLocation?: ExternalLocationConfig;

Defined in: src/server.ts:71

Configuration for externalizing oversized record batches to blob storage.


optional grantKeys?: "env" | GrantKeys | null;

Defined in: src/server.ts:103

Sealed-grant configuration (WIRE_PROTOCOL.md §16). "env" (the default) reads VGI_RPC_GRANT_KEYS and friends – unset means grants are off and nothing changes. With keys, the framework mints sealed grants through issue_grant (unless identity supplies mintGrant), and an HTTP handler serving this server accepts them back as bearer credentials. null turns grants off regardless of the environment. A malformed key throws here: a worker refuses to start rather than run with a key it misread.


optional identity?: IdentityImpl;

Defined in: src/server.ts:92

Host vgi_rpc.Identity.v1 with this implementation. Only the methods whose hooks it was given are hosted; with neither hook nothing is. Host it only on servers whose transport authenticates callers (HTTP).


optional includeTracebacks?: boolean;

Defined in: src/server.ts:112

Whether EXCEPTION batches carry the remote traceback (log_extra.traceback). Default true, on every transport: the DuckDB extension puts the remote traceback into the error a user sees, and omitting it on HTTP hid chained causes. false turns it off on all transports at once. The exception type, message, code, kind and details are sent either way. WIRE_PROTOCOL.md §8, “Tracebacks”.


optional onServeStart?: ServeStartHook;

Defined in: src/server.ts:75

Lifecycle hook fired once before the first dispatched request.


optional protocols?: readonly Protocol[];

Defined in: src/server.ts:88

Additional application protocols, hosted after the primary in this order (WIRE_PROTOCOL.md §3.1, “Hosting several application protocols”).

A Protocol carries its handlers, so each entry is the whole (protocol, implementation) pair. The set is fixed for the server’s life and is the same on every transport the server is handed to – VgiRpcServer.serveConnection, serveTcp, serveUnix, serveStream and createHttpHandler all accept this server. Names must be unique, and none may use the reserved vgi_rpc. prefix: reflection is hosted automatically and identity through identity.


optional protocolVersion?: string;

Defined in: src/server.ts:73

Protocol version string reported in the service description.


optional serverId?: string;

Defined in: src/server.ts:67

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