Commit graph

2 commits

Author SHA1 Message Date
jianglai
b6d2790a13 Add TokenStore and QuotaManager to manage proxy quota requests
The TokenStore is configured by a QuotaConfig for a protocol (EPP/WHOIS). It accepts concurrent take, put and refresh request to grant/accept token to the caller.

The QuotaManager contains a TokenStore and provides abstractions that are appropriate for a quota leasing entity to use. Quota return calls are executed asynchronously by the QuotaManager, and quota refresh tasks are scheduled by the QuotaManager to run periodically.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=182109341
2018-01-19 14:46:44 -05:00
jianglai
c5515ab4e6 Add ability to configure proxy quotas
The quotas can be configured in the yaml configuration file. Default quota will be applied to any userId that is not matched in the custom quota list.

-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=178804649
2017-12-13 12:43:45 -05:00