Packages

ComputeRated, a leaky bucket rate limiter optimized for compute time limits. This library allows you to rate-limit operations based on compute time, with support for checking capacity, adding compute time, and waiting for capacity to be available.

Current section

Files

Jump to
compute_rated lib compute_rated_app.ex
Raw

lib/compute_rated_app.ex

defmodule ComputeRated.App do
@moduledoc false
use Application
def start(_type, _args) do
children = [
{ComputeRated, [[], [name: :compute_rated]]}
]
opts = [strategy: :one_for_one, name: ComputeRated.Supervisor]
Supervisor.start_link(children, opts)
end
end