RateLimiter

RateLimiter provides an interface for rate limiting HTTP requests.

Members

Functions

check
bool check(Bucket bucket, Duration timeout)

Check whether a request can be made for a bucket. If the bucket is on cooldown, wait until the cooldown resets before returning.

update
void update(Bucket bucket, string remaining, string reset, string retryAfter)

Update a given bucket with headers returned from a request.

Meta