class

RateLimiter(T)

Inherits Reference < Object

A utility class for performing rate limit queries under certain conditions. See specs/ for example usage.

Constants

VERSION = "0.1.0"

Constructors

Instance methods

bucket(name : Symbol, limit : UInt32, time_span : Time::Span, delay : Time::Span = 0.seconds)

Creates a new bucket with name and specified properties. See Bucket#initialize

Source
clean

Cleans all buckets. See Bucket#clean.

Source
rate_limited?(name : Symbol, key : T)

Searches for a bucket with name, and performs a rate limit request with key

Source

Nested types