module

RateLimiter

Rate limiting functionality.

Constants

VERSION = "1.0.1"

Constructors

new(rate : Float64, max_burst : Int32 = 1)

Creates a new Limiter. rate: the rate of tokens being produced in tokens/second. max_burst: maximum number of tokens that can be stored in the bucket.

Source
new(interval : Time::Span, max_burst : Int32 = 1)

Creates a new Limiter. interval: the interval at which new tokens are generated. max_burst: maximum number of tokens that can be stored in the bucket.

Source
new(*limiters : Limiter)

Creates a MultiLimiter. limiters: a set of rate limiters.

Source

Nested types