Skip to content
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
merged 38 commits into from
Aug 26, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
a828482
hystrix filter added
Jul 17, 2019
431eeb9
Merge pull request #1 from apache/master
YGrylls Jul 17, 2019
b485e8d
config for hystrix filter added
YGrylls Jul 17, 2019
dd05253
fmt the code
YGrylls Jul 17, 2019
0781ce5
delete unused constants
YGrylls Jul 17, 2019
c089a43
change panic in confit initializaiton to error
YGrylls Jul 17, 2019
d2a61dc
fallback config added, see examples/hystrix_example
YGrylls Jul 18, 2019
0ee30d0
Changes in fallback function, now it receives 4 parameters:
YGrylls Jul 18, 2019
ef3b42c
Change comments
YGrylls Jul 18, 2019
7f579b1
Add nil check for fallback func return
YGrylls Jul 18, 2019
08dd542
wrong spell
YGrylls Jul 18, 2019
75aba16
Make the fallback func an interface
YGrylls Jul 18, 2019
79ab52c
Unit tests: invoke and refresh to be done
YGrylls Jul 18, 2019
b7e9c61
Unit tests for hystrix filter done
YGrylls Jul 22, 2019
8e647d4
Merge pull request #2 from apache/master
YGrylls Jul 22, 2019
508d9a0
Update from master
YGrylls Jul 22, 2019
ca9793d
Examples change
YGrylls Jul 22, 2019
08b064a
Merge branch 'develop' into hystrix_filter
YGrylls Jul 22, 2019
b6a964b
Fix example
YGrylls Jul 22, 2019
faa779c
Fix the probelm occurs when filter_conf is nil
YGrylls Jul 22, 2019
3e7042d
Unit test fix
YGrylls Jul 22, 2019
f604d42
fix
YGrylls Jul 22, 2019
40689de
Fix import cycle in protocol_filter_wrapper_test
YGrylls Jul 22, 2019
c50bd5a
fmt
YGrylls Jul 22, 2019
4b52478
Standardize the import format, add lisences infomation for new file
YGrylls Jul 23, 2019
67bae9a
Overhaul: Fix concurrency problems; Add support for server end; Add e…
YGrylls Jul 24, 2019
588a5a8
Example Added for client and fallback
YGrylls Jul 25, 2019
b954e6a
Merge branch 'develop' into hystrix_filter
YGrylls Jul 25, 2019
3c4722a
Add some unit tests
YGrylls Jul 25, 2019
a939b43
fix unit tests
YGrylls Jul 25, 2019
83aad3f
fix unit tests
YGrylls Jul 25, 2019
aedf81b
Add license info for example
YGrylls Jul 26, 2019
515c472
Merge apache/develop into ygrylls/hystrix_filter
YGrylls Jul 31, 2019
4fe6fa3
Change hystrix example directory and modified to follow other new exa…
YGrylls Jul 31, 2019
7e88874
Remove old hessian in go.mod
YGrylls Jul 31, 2019
207fb39
Merge and fix the problems found in review
YGrylls Aug 12, 2019
67bc50d
Merge remote-tracking branch 'upstream/develop' into hystrix_filter
YGrylls Aug 25, 2019
10103db
Merge branch 'develop' into hystrix_filter
YGrylls Aug 26, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix the probelm occurs when filter_conf is nil
  • Loading branch information
YGrylls committed Jul 22, 2019
commit faa779c46cd0cec8fe675d8d7af2a2c14f93eafc
3 changes: 3 additions & 0 deletions filter/impl/hystrix_filter.go
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,9 @@ func getConfig(service string, method string) CommandConfigWithFallback {
}

func initHystrixConfig() error {
if config.GetConsumerConfig().FilterConf == nil{
return perrors.Errorf("no config for hystrix")
}
filterConfig := config.GetConsumerConfig().FilterConf.(map[interface{}]interface{})[HYSTRIX]
if filterConfig == nil {
return perrors.Errorf("no config for hystrix")
Expand Down
7 changes: 0 additions & 7 deletions filter/impl/hystrix_filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,13 +106,6 @@ func TestDefaultHystrixFallback_FallbackFunc(t *testing.T) {

}

type (
User struct {
Id string `json:"id"`
Name string `json:"name"`
}
)

type testMockSuccessInvoker struct {
protocol.BaseInvoker
}
Expand Down