[]previous and next page

BucketSpec

Parameters of one token bucket.

Parameters of one token bucket.

Import#

ts
import type { BucketSpec } from "@shadow-js/dusk/server";

Signature#

ts
interface BucketSpec {
  /** Most tokens the bucket holds (the burst size). */
  readonly capacity: number;
  /** Tokens added per second. */
  readonly refillPerSecond: number;
}

Members#

Name Type Description
capacity readonly capacity: number Most tokens the bucket holds (the burst size).
refillPerSecond readonly refillPerSecond: number Tokens added per second.