Files
ntfy/util
binwiederhier 4bbb4418a5 One limiter model in package limit, replacing the three limiter types in the visitor
Allow(key, rule, n), Refund, Tokens and Usage on a service that keeps a
token bucket and a daily count per key and kind, sharded by key, with the
rule passed in on every call. The server's visitor keeps its identity and
the resolved limits and asks the service; rate.Limiter, util.RateLimiter
and util.FixedLimiter are gone from it (subscriptions stay a per-node
gauge). util.RateLimiter, NewBytesLimiter and BurnTokens had no users
left and are removed.

Behavior changes: refunds work for every kind (a revert on the bandwidth
limiter hands the bytes back), a tier change applies on the next request
without handing back full buckets, a changed tier limit applies without
a tier ID change, and the daily email limit is a real daily cap on top
of the bucket. Step 2 of plans/261025-shared-rate-limits.md.
2026-10-25 15:50:03 +00:00
..
2026-08-03 18:34:29 +02:00
2022-09-27 12:37:02 -04:00
2022-03-10 21:55:56 -05:00
2022-10-01 16:31:48 -04:00
2023-01-18 15:50:06 -05:00
2023-02-08 22:57:10 -05:00
2024-03-20 21:33:54 -04:00
2026-10-07 14:46:32 +00:00
2026-10-07 14:46:32 +00:00