mirror of
https://github.com/google/nomulus.git
synced 2025-08-04 08:52:12 +02:00
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
This commit is contained in:
parent
c941190e71
commit
c5515ab4e6
8 changed files with 258 additions and 1 deletions
8
javatests/google/registry/proxy/quota/testdata/quota_config_default.yaml
vendored
Normal file
8
javatests/google/registry/proxy/quota/testdata/quota_config_default.yaml
vendored
Normal file
|
@ -0,0 +1,8 @@
|
|||
refreshSeconds: 3600
|
||||
|
||||
defaultQuota:
|
||||
userId: []
|
||||
tokenAmount: 100
|
||||
refillSeconds: 60
|
||||
|
||||
customQuota: []
|
14
javatests/google/registry/proxy/quota/testdata/quota_config_duplicate.yaml
vendored
Normal file
14
javatests/google/registry/proxy/quota/testdata/quota_config_duplicate.yaml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
refreshSeconds: 3600
|
||||
|
||||
defaultQuota:
|
||||
userId: []
|
||||
tokenAmount: 100
|
||||
refillSeconds: 60
|
||||
|
||||
customQuota:
|
||||
- userId: ["abc", "def"]
|
||||
tokenAmount: 10
|
||||
refillSeconds: 60
|
||||
- userId: ["xyz123", "def", "luckycat"]
|
||||
tokenAmount: 500
|
||||
refillSeconds: 10
|
14
javatests/google/registry/proxy/quota/testdata/quota_config_regular.yaml
vendored
Normal file
14
javatests/google/registry/proxy/quota/testdata/quota_config_regular.yaml
vendored
Normal file
|
@ -0,0 +1,14 @@
|
|||
refreshSeconds: 3600
|
||||
|
||||
defaultQuota:
|
||||
userId: []
|
||||
tokenAmount: 100
|
||||
refillSeconds: 60
|
||||
|
||||
customQuota:
|
||||
- userId: ["abc", "def"]
|
||||
tokenAmount: 10
|
||||
refillSeconds: 60
|
||||
- userId: ["xyz123", "987lol", "luckycat"]
|
||||
tokenAmount: 500
|
||||
refillSeconds: 10
|
Loading…
Add table
Add a link
Reference in a new issue