Coffrify. Runtime. RateLimit. LeakyBucket
(Coffrify v0.9.0)
View Source
Leaky bucket — paces requests at a steady drain rate. Rejects with
{:error, :overflow} when the queue is saturated.
Summary
Functions
Returns a specification to start this module under a supervisor.
Start a leaky-bucket limiter.
Types
@type opts() :: [ capacity: pos_integer(), leak_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 leaky-bucket limiter.