Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Bucket

Hierarchy

  • Bucket

Index

Constructors

Properties

Methods

Constructors

constructor

  • new Bucket(tokenLimit: number, interval: number, options: { latencyRef: { latency: number }; reservedTokens: number }): Bucket
  • Parameters

    • tokenLimit: number
    • interval: number
    • options: { latencyRef: { latency: number }; reservedTokens: number }
      • latencyRef: { latency: number }
        • latency: number
      • reservedTokens: number

    Returns Bucket

Properties

interval

interval: number

lastReset

lastReset: number

lastSend

lastSend: number

tokenLimit

tokenLimit: number

tokens

tokens: number

Methods

queue

  • queue(func: Function, priority?: boolean): void
  • Parameters

    • func: Function
    • Optional priority: boolean

    Returns void

Generated using TypeDoc