Ratelix.LeakyBucket (ratelix v0.3.0)

View Source

Implements a Leaky Bucket rate limiter as a GenServer.

Summary

Functions

Returns a specification to start this module under a supervisor.

Types

t()

@type t() :: %Ratelix.LeakyBucket{
  capacity: pos_integer(),
  interval: pos_integer(),
  length: non_neg_integer(),
  queue: :queue.queue()
}

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.