-
Notifications
You must be signed in to change notification settings - Fork 933
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
Ftr: Hystrix filter for circuit break and service downgrade #133
Merged
Conversation
This file contains 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
Update fork
error, invoker, invocation, circuitbreaker And returns a new result
Update README.md
pls resolve the conflicting files |
For implement of hystrix filter depends on config package to get user config, it causes import cycle in test for protocol filter wrapper. Now the test depends on filter interface instead of filter implement, so that the cycle is solved.
Codecov Report
@@ Coverage Diff @@
## develop #133 +/- ##
===========================================
+ Coverage 66.85% 67.86% +1.01%
===========================================
Files 93 94 +1
Lines 5729 5847 +118
===========================================
+ Hits 3830 3968 +138
+ Misses 1491 1466 -25
- Partials 408 413 +5
Continue to review full report at Codecov.
|
…rror whitelist(omit) TODO: Make downgrade a standalone filter, so it can offer more freedom for users and avoid extensions on extensions TODO: Add a new example
fix the problem that all methods under one service share the regexp rules
YGrylls
changed the title
Hystrix filter for circuit break and service downgrade
Ftr: Hystrix filter for circuit break and service downgrade
Aug 12, 2019
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.
What this PR does:
Add an implement of filter for circuit break, based on hystrix-go, see filter/impl/hystrix_filter.go
The config of hystrix is exposed to users in the consumer config. Thus a new field FilterConf is added, just like the protocol conf existed.
The service downgrade can also be customized by users by defining extra filters that handles the error returned from hystrix filter, an example is offered
This filter is designed for both client and server end, now only client works because temporarily filters in server end can not get the return information from callService, see protocol/dubbo/listener OnMessage(). Once they are integrated in the future, the filter can be used in server end just like in client end
Special notes for your reviewer:
Unit test is done, see filter/impl/hystrix_filter_test.go
Does this PR introduce a user-facing change?: