RouterOptions
Auto-generated API reference for RouterOptions.
Interface: RouterOptions
Defined in: adapters/src/router.ts:47
#Properties
#candidates
candidates:
RouterCandidate[]
Defined in: adapters/src/router.ts:48
#classify?
optionalclassify?: (request) =>string|string[] |undefined
Defined in: adapters/src/router.ts:59
Fast path: inspect the request, return a candidate id or tag(s).
Return undefined to fall back to policy.
#Parameters
request
AdapterRequest
#Returns
string | string[] | undefined
#onRoute?
optionalonRoute?: (decision) =>void
Defined in: adapters/src/router.ts:61
Observability hook β fires once per decision.
#Parameters
decision
id
string
reason
string
request
AdapterRequest
#Returns
void
#policy?
optionalpolicy?:RouterPolicy
Defined in: adapters/src/router.ts:54
Policy when classify doesn't pick a candidate. Default 'cheapest'.
#region?
optionalregion?:DataRegion
Defined in: adapters/src/router.ts:50
Require all selected adapters to match this data-residency region.
#regionOf?
optionalregionOf?: (request) =>DataRegion|undefined
Defined in: adapters/src/router.ts:52
Dynamic region selector. Takes precedence over region.
#Parameters
request
AdapterRequest
#Returns
DataRegion | undefined