GamendWeb.RateLimit.ETS (gamend_web v1.0.1216)

Copy Markdown View Source

Node-local rate limiter backend powered by Hammer's ETS backend.

Fast and dependency-free, but each app instance keeps its own counters — in multi-instance deployments the effective limit is multiplied by the number of instances. Use GamendWeb.RateLimit.Redis there instead.

Summary

Functions

Callback implementation for Hammer.expires_at/2.

Callback implementation for Hammer.get/2.

Callback implementation for Hammer.inc/3.

Callback implementation for Hammer.set/3.

Functions

child_spec(opts)

expires_at(key, scale)

Callback implementation for Hammer.expires_at/2.

get(key, scale)

Callback implementation for Hammer.get/2.

hit(key, scale, limit, increment \\ 1)

Callback implementation for Hammer.hit/4.

inc(key, scale, increment \\ 1)

Callback implementation for Hammer.inc/3.

set(key, scale, count)

Callback implementation for Hammer.set/3.

start_link(opts)