-
Notifications
You must be signed in to change notification settings - Fork 439
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refine GetResRule API and GetRules API in flow/circuitbreaker/hotspot/system module #239
Refine GetResRule API and GetRules API in flow/circuitbreaker/hotspot/system module #239
Conversation
Codecov Report
@@ Coverage Diff @@
## master #239 +/- ##
==========================================
- Coverage 42.93% 42.64% -0.29%
==========================================
Files 74 74
Lines 4316 4345 +29
==========================================
Hits 1853 1853
- Misses 2230 2259 +29
Partials 233 233
Continue to review full report at Codecov.
|
core/circuitbreaker/rule_manager.go
Outdated
// It doesn't take effect for circuit breaker module if user changes the rule. | ||
// GetResRules need to compete circuit breaker module's global lock and the high performance losses of copy, | ||
// reduce or do not call GetResRules frequently if possible | ||
func GetResRules(resource string) []Rule { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about GetRulesOfResource
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's ok for me.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Thanks! |
Describe what this PR does / why we need it
Refine GetResRule func and GetRules func in flow/circuitbreaker/hotspot/system module
Does this pull request fix one issue?
Describe how you did it
Describe how to verify it
Special notes for reviews