Files
NapCatQQ/.pnpm-store/v3/files/da/45c5de994bebc6ea79e6af1594ae0c3d45912e6efa1b87914010a22575a4ac00820aaa1ff66d8d48b6c77143c915eb8ec28889eefecc30f4332ab97ef5bf12
T
TanTan e311ca3275
Build NapCat Artifacts / Type Check & Test (push) Waiting to run
docs: 仓库链接指向本镜像仓库
2026-11-13 09:25:58 +08:00

17 lines
384 B
Plaintext

import { IBackOffOptions } from "../options";
import { fullJitter } from "./full/full.jitter";
import { noJitter } from "./no/no.jitter";
export type Jitter = (delay: number) => number;
export function JitterFactory(options: IBackOffOptions): Jitter {
switch (options.jitter) {
case "full":
return fullJitter;
case "none":
default:
return noJitter;
}
}