mirror of
https://github.com/google/nomulus
synced 2026-08-27 19:37:07 +00:00
This separates the logic of "how many tokens should a particular user/group have" from "manage the quota given whatever limits, contacting Valkey". This is in preparation for allowing other types of quota management and throttling besides just on the EPP server (e.g. domain-create throttling). We also convert the expirations from seconds to milliseconds (and use a Duration so that this is masked from users). It's better to have the API use a full-fledged Duration object rather than an int, and this allows for finer control over expiration times. Note that we'll probably want to use a sliding window in the future instead of a fixed window, but that's a problem for future us.