Coffrify. Runtime. RateLimit. TokenBucket
(Coffrify v0.9.0)
View Source
Classic token bucket. Allows bursts up to capacity and refills at
refill_per_second tokens/second.
Summary
Functions
Returns a specification to start this module under a supervisor.
Start a token-bucket limiter.
Types
@type opts() :: [ capacity: pos_integer(), refill_per_second: pos_integer(), name: GenServer.name() ]
Functions
Returns a specification to start this module under a supervisor.
See Supervisor.
@spec start_link(opts()) :: GenServer.on_start()
Start a token-bucket limiter.