snapcap
API ReferenceType Aliases

ThrottleRule

Type Alias: ThrottleRule

type ThrottleRule = {
  burst?: number;
  match:   | string
     | RegExp;
  minIntervalMs: number;
};

Defined in: transport/throttle.ts:107

One throttle rule. Matches outbound URLs and gates them at a minimum inter-call interval, with optional burst headroom.

Remarks

First-match wins inside a ThrottleConfig.rules array — order rules from most-specific to least-specific.

See

Properties

PropertyTypeDescriptionDefined in
burst?numberOptional burst capacity — N requests can fire freely before the floor kicks in. Useful for batched fetches (e.g. publicInfo lookups). Defaults to 0 (every request enforces the floor).transport/throttle.ts:117
match| string | RegExpURL substring or regex. Substring match is case-sensitive.transport/throttle.ts:109
minIntervalMsnumberFloor between consecutive matching requests, in milliseconds.transport/throttle.ts:111

On this page