[APIGW]: throttling policy management #607
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it
Package to manage throttling policies
Refers to: #2403.
Acceptance tests
=== RUN TestThrottlingPolicyLifecycle
tools.go:72: {
"app_call_limits": 50,
"name": "test_policy_1QYv2_updated",
"time_unit": "MINUTE",
"remark": "test throttling policy updated",
"api_call_limits": 199,
"type": 1,
"enable_adaptive_control": "FALSE",
"user_call_limits": 50,
"time_interval": 999,
"ip_call_limits": 0,
"id": "7d1bf038797d454f8013c395bf0bc12f",
"bind_num": 0,
"is_inclu_special_throttle": 2,
"create_time": "2024-01-11T02:08:44Z"
}
--- PASS: TestThrottlingPolicyLifecycle (1.67s)
=== RUN TestThrottlingPolicyList
tools.go:72: [
{
"app_call_limits": 0,
"name": "Throttling_ozcf",
"time_unit": "MINUTE",
"remark": "",
"api_call_limits": 200,
"type": 1,
"enable_adaptive_control": "FALSE",
"user_call_limits": 0,
"time_interval": 2,
"ip_call_limits": 0,
"id": "7782f5327cf54bf1ac9fe804faf64ab3",
"bind_num": 0,
"is_inclu_special_throttle": 2,
"create_time": "2024-01-11T02:05:25Z"
}
]
--- PASS: TestThrottlingPolicyList (0.54s)
PASS
Process finished with the exit code 0