DispatchHook
Defined in: src/types.ts:372
Observability hook called around RPC dispatch. Implementations must be safe for concurrent use (HTTP transport is concurrent).
Methods
Section titled “Methods”onDispatchEnd()
Section titled “onDispatchEnd()”onDispatchEnd( token, info, stats, error?): void;Defined in: src/types.ts:378
Invoked after the method completes or throws. stats carries the per-call
I/O counters; error is set only when the dispatch failed.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
token |
unknown |
info |
DispatchInfo |
stats |
CallStatistics |
error? |
Error |
Returns
Section titled “Returns”void
onDispatchStart()
Section titled “onDispatchStart()”onDispatchStart(info): unknown;Defined in: src/types.ts:375
Invoked before the method runs. The returned HookToken is opaque to the framework and passed back to onDispatchEnd.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
info |
DispatchInfo |
Returns
Section titled “Returns”unknown
