Add basic interface and adaptations for Sentinel cluster flow control in sentinel-core - #257
Merged
Conversation
- Add a universal `TokenService` SPI interface for both local flow control and distributed flow control - Add TokenResult entity to represents result of acquiring token - Add `ClusterTokenClient` as the SPI interface for client of Sentinel cluster flow control Signed-off-by: Eric Zhao <sczyh16@gmail.com>
- Add new field `clusterMode` and `clusterConfig` for cluster mode - Add a `ClusterFlowConfig` class for specific items for cluster flow control - Update FlowRuleChecker to support cluster mode - Extract valid rule checking and rule map generating logic to FlowRuleUtil Signed-off-by: Eric Zhao <sczyh16@gmail.com>
sczyh30
force-pushed
the
feature/cluster-core
branch
2 times, most recently
from
November 23, 2018 02:05
55858cb to
1010836
Compare
…util class - Update ParamFlowRule to support cluster mode - Add `ParamFlowClusterConfig` to provide cluster mode items for the rule - Update ParamFlowChecker to support cluster flow mode - Extract ParamFlowRuleUtil class - Change type of `flowId` from Integer to Long Signed-off-by: Eric Zhao <sczyh16@gmail.com>
sczyh30
force-pushed
the
feature/cluster-core
branch
from
November 23, 2018 02:14
11d07cc to
f539b5b
Compare
Codecov Report
@@ Coverage Diff @@
## master #257 +/- ##
============================================
- Coverage 52.59% 50.65% -1.94%
- Complexity 913 923 +10
============================================
Files 150 158 +8
Lines 5037 5249 +212
Branches 720 754 +34
============================================
+ Hits 2649 2659 +10
- Misses 2065 2253 +188
- Partials 323 337 +14
Continue to review full report at Codecov.
|
CarpenterLee
approved these changes
Nov 23, 2018
Arlmls
pushed a commit
to Arlmls/Sentinel
that referenced
this pull request
Jan 8, 2019
Add basic interface and adaptations for Sentinel cluster flow control in `sentinel-core` (alibaba#257)
CST11021
pushed a commit
to CST11021/Sentinel
that referenced
this pull request
Nov 3, 2021
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Describe what this PR does / why we need it
Add basic interface for Sentinel cluster flow control in
sentinel-core, and update rules and checkers forFlowRuleandParamFlowRuleto adapt to cluster flow control interface.Does this pull request fix one issue?
Related to #200 (a sub-task of it)
Describe how you did it
TokenServiceSPI interface for both local flow control and distributed flow control serviceTokenResultentity to represent result of acquiring tokenClusterTokenClientas the SPI interface for client of Sentinel cluster flow controlclusterModeandclusterConfigfor cluster modeClusterFlowConfigandParamFlowClusterConfigclass for rule config in cluster modeFlowRuleCheckerandParamFlowCheckerto support cluster modeFlowRuleandParamFlowRuleDescribe how to verify it
See test cases.
Special notes for reviews
NONE