Packages

A simple rate limiting application based on source ip address.

Current section

Files

Jump to
rate_limiting lib rate_limit supervisor.ex
Raw

lib/rate_limit/supervisor.ex

defmodule RateLimiting.Supervisor do
def init(:ok) do
children = [
{RateLimiting.Registry, name: RateLimiting.Registry},
{DynamicSupervisor, name: RateLimiting.BucketSupervisor, strategy: :one_for_one}
]
Supervisor.init(children, strategy: :one_for_one)
end
end