Per-username concurrent allocation limit.
What problem this solves
Service operators often cap how many live relay allocations one username may
hold. This ETS-backed counter enforces :allocation_quota from application
env, returning STUN error 486 when the limit is reached.
RFCs
- RFC 5766 (allocation error 486 Allocation Quota Reached)
Summary
Functions
Returns :ok or {:error, 486} when the username is at the configured quota.
Decrements the live allocation count for username. Returns :ok.
Increments the live allocation count for username. Returns :ok.
Creates the public allocation-quota ETS table if it does not exist.
Functions
Returns :ok or {:error, 486} when the username is at the configured quota.
Decrements the live allocation count for username. Returns :ok.
Increments the live allocation count for username. Returns :ok.
@spec init() :: :ok
Creates the public allocation-quota ETS table if it does not exist.