Attributes
- Companion
- class
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
- Self type
-
RateLimiter.type
Members list
Value members
Concrete methods
Creates a rate limiter with a fixed window algorithm.
Creates a rate limiter with a fixed window algorithm.
Takes into account the entire duration of the operation. That is the instant at which the operation "happens" can be anywhere between its start and end. This ensures that the rate limit is always respected, although it might make it more restrictive.
Must be run within an Ox concurrency scope, as a background fork is created, to replenish the rate limiter.
Value parameters
- maxOperations
-
Maximum number of operations that are allowed to run (finishing from previous windows or start new) within a time window.
- window
-
Length of the window.
Attributes
- See also
Creates a rate limiter using a fixed window algorithm. Takes into account the start time of the operation only.
Creates a rate limiter using a fixed window algorithm. Takes into account the start time of the operation only.
Must be run within an Ox concurrency scope, as a background fork is created, to replenish the rate limiter.
Value parameters
- maxOperations
-
Maximum number of operations that are allowed to start within a time window.
- window
-
Interval of time between replenishing the rate limiter. The rate limiter is replenished to allow up to maxOperations in the next time window.
Attributes
- See also
Creates a rate limiter with token/leaky bucket algorithm. Takes into account the start time of the operation only.
Creates a rate limiter with token/leaky bucket algorithm. Takes into account the start time of the operation only.
Must be run within an Ox concurrency scope, as a background fork is created, to replenish the rate limiter.
Value parameters
- maxTokens
-
Max capacity of tokens in the algorithm, limiting the operations that are allowed to start concurrently.
- refillInterval
-
Interval of time between adding a single token to the bucket.
Attributes
Creates a rate limiter using a sliding window algorithm.
Creates a rate limiter using a sliding window algorithm.
Takes into account the entire duration of the operation. That is the instant at which the operation "happens" can be anywhere between its start and end. This ensures that the rate limit is always respected, although it might make it more restrictive.
Must be run within an Ox concurrency scope, as a background fork is created, to replenish the rate limiter.
Value parameters
- maxOperations
-
Maximum number of operations that are allowed to run (start or finishing) within any window of time.
- window
-
Length of the window.
Attributes
- See also
Creates a rate limiter using a sliding window algorithm. Takes into account the start time of the operation only.
Creates a rate limiter using a sliding window algorithm. Takes into account the start time of the operation only.
Must be run within an Ox concurrency scope, as a background fork is created, to replenish the rate limiter.
Value parameters
- maxOperations
-
Maximum number of operations that are allowed to start within any window of time.
- window
-
Length of the window.
Attributes
- See also