Skip to main content

LeakyBucketOptions

@discordeno/utils


Documentation / @discordeno/utils / LeakyBucketOptions

Interface: LeakyBucketOptions

Defined in: packages/utils/src/bucket.ts:119

Properties

logger?

optional logger: Pick<{ debug: (...args) => void; error: (...args) => void; fatal: (...args) => void; info: (...args) => void; log: (level, ...args) => void; setDepth: (level) => void; setLevel: (level) => void; warn: (...args) => void; }, "debug" | "info" | "warn" | "error" | "fatal">

Defined in: packages/utils/src/bucket.ts:139

The logger that the leaky bucket will use

Default

logger // The logger exported by @discordeno/utils


max?

optional max: number

Defined in: packages/utils/src/bucket.ts:124

Max requests allowed at once.

Default

1

refillAmount?

optional refillAmount: number

Defined in: packages/utils/src/bucket.ts:134

Amount of requests to refill at each interval.

Default

1

refillInterval?

optional refillInterval: number

Defined in: packages/utils/src/bucket.ts:129

Interval in milliseconds between refills.

Default

5000