ExWaiter.RateLimiting (ex_waiter v1.3.1) View Source
Link to this section Summary
Link to this section Types
Specs
bucket() :: {token_count(), unix_timestamp_in_ms()}
Specs
options() :: [ refill_rate: pos_integer(), interval: pos_integer(), burst_limit: pos_integer(), cost: pos_integer() ]
Specs
token_count() :: non_neg_integer()
Specs
unix_timestamp_in_ms() :: pos_integer()
Link to this section Functions
Specs
limit_rate(bucket() | nil, options()) :: {:ok, bucket(), ExWaiter.RateLimiting.Limiter.t()} | {:error, bucket(), ExWaiter.RateLimiting.Limiter.t()}