Ecto backend for the Hammer rate-limiter.
Hammer-backend-ecto
is available in Hex, the package
can be installed by adding hammer_backend_ecto
to your list of dependencies in mix.exs
:
def deps do
[{:hammer_backend_ecto, "~> 0.1.0"}]
end
worker(Hammer.Backend.Ecto, [[expiry_ms: 1000 * 60 * 2]]),
See the Hammer Tutorial for more.
On hexdocs: https://hexdocs.pm/hammer_backend_ecto/api-reference.html