TokenBucketRateLimiter class

Token bucket rate limiter implementation.

Uses a token bucket algorithm to enforce rate limits. Tokens are added at a steady rate, and each request consumes a token.

Constructors

TokenBucketRateLimiter(RateLimiter config)
Creates a token bucket rate limiter.

Properties

config RateLimiter
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

acquire() Future<void>
Wait for a token to become available.
dispose() → void
Dispose of the rate limiter and cancel any pending operations.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited