Skip to content

DispatchInfo

Defined in: src/types.ts:321

Metadata passed to dispatch hooks before and after RPC method execution.

optional authDomain?: string;

Defined in: src/types.ts:344

Authentication domain, empty string when anonymous.


optional authenticated?: boolean;

Defined in: src/types.ts:346

True when the call was authenticated.


optional cancelled?: boolean;

Defined in: src/types.ts:369

True when a stream was cancelled by the client.


optional claims?: Record<string, unknown>;

Defined in: src/types.ts:373

Verified claims of the authenticated principal. Emitters MUST redact these by key before writing them — an access log outlives the token it describes.


optional deferral?: AccessLogDeferral;

Defined in: src/types.ts:387

Where to hand a record that still needs the final on-wire response size. Installed by transports that can measure it (HTTP); absent elsewhere, in which case a hook emits inline.


optional externalizedBytes?: number;

Defined in: src/types.ts:383

Bytes uploaded to external storage during this call. These never appear in the response body — only a pointer batch does — so they are invisible to transport-level accounting and are frequently the largest of the three byte figures.


optional httpStatus?: number;

Defined in: src/types.ts:351

HTTP transport: the status code the response went out with. Absent on transports that have no such thing (pipe, Unix socket, TCP).


optional kind?: TransportKind;

Defined in: src/types.ts:332

Coarse transport identifier — pipe for stdio, http for fetch handlers, unix for AF_UNIX.


method: string;

Defined in: src/types.ts:323

RPC method name.


methodType: string;

Defined in: src/types.ts:325

“unary” or “stream”.


optional principal?: string;

Defined in: src/types.ts:342

Authenticated principal, empty string when anonymous.


optional protocol?: string;

Defined in: src/types.ts:334

Logical service / protocol name.


optional protocolHash?: string;

Defined in: src/types.ts:338

SHA-256 hex of the canonical description of the protocol that owns the dispatched method – not the server’s primary. Always required in the access log, where it is the registry key for decoding archived records.


optional protocolVersion?: string;

Defined in: src/types.ts:340

Operator-supplied protocol-contract version label (optional).


optional remoteAddr?: string;

Defined in: src/types.ts:348

HTTP transport: remote IP:port.


optional requestBytes?: number;

Defined in: src/types.ts:378

On-wire size of the request body as received, before decompression: what the peer actually sent. Distinct from the logical Arrow byte counts in CallStatistics, which measure what the worker processed and routinely differ by orders of magnitude.


optional requestFields?: AccessLogRequestField[];

Defined in: src/types.ts:357

Shape of the request batch – parameter names and Arrow type tokens, in schema order – on unary calls and stream init only. Never the values: the framework cannot know which parameters are secret (a VGI catalog_attach carries API keys and passwords), so no payload reaches a dispatch hook.


requestId: string | null;

Defined in: src/types.ts:329

Client-supplied request identifier, or null.


optional requestRows?: number;

Defined in: src/types.ts:359

Row count of the request batch; present exactly when requestFields is.


optional requestStateBytes?: number;

Defined in: src/types.ts:363

HTTP streams: size of the state token the client sent on this turn. The token itself is never exposed – it is the serialized stream state, which may hold anything the call was given, and a replayable continuation.


optional responseStateBytes?: number;

Defined in: src/types.ts:365

HTTP streams: size of the state token returned on this turn.


serverId: string;

Defined in: src/types.ts:327

Server identifier.


optional sessionAction?: "none" | "resume" | "open" | "close";

Defined in: src/types.ts:394

Sticky-session lifecycle action observed during dispatch — one of "none" / "resume" / "open" / "close". Omitted when sticky is disabled or the request never touched the sticky middleware.


optional sessionId?: string;

Defined in: src/types.ts:390

Sticky session ID (24-char hex). Present only when the request was bound to a sticky session or the method opened/closed one.


optional streamId?: string;

Defined in: src/types.ts:367

Stream lifecycle identifier (32-char lowercase hex); empty on unary.