Skip to content
Snippets Groups Projects
Commit c50bd5a8 authored by YGrylls's avatar YGrylls
Browse files

fmt

parent 40689dec
Branches
Tags
No related merge requests found
......@@ -8,7 +8,6 @@ import "github.com/afex/hystrix-go/hystrix"
const EXAMPLE_FALLBACK_NAME = "exampleFallback"
type ExampleHystrixFallback struct {
}
......@@ -29,7 +28,6 @@ func(f *ExampleHystrixFallback) FallbackFunc (err error, invoker protocol.Invoke
return result
}
//Add the fallback function to the map
//The name MUST be the same as in your config file
func init() {
......
......@@ -7,6 +7,7 @@ import (
type DefaultHystrixFallback struct {
}
func (d *DefaultHystrixFallback) FallbackFunc(err error, invoker protocol.Invoker, invocation protocol.Invocation, cb hystrix.CircuitBreaker) protocol.Result {
//By default, return nil value and the error occurred
res := &protocol.RPCResult{}
......
......@@ -45,7 +45,6 @@ func mockInitHystrixConfig(){
6000,
60,
"exampleFallback",
}
conf.Services["com.ikurento.user.UserProvider"] = ServiceHystrixConfig{
"userp",
......
......@@ -39,8 +39,10 @@ import (
const (
MOCK = "mock"
)
type MockFilter struct {
}
func (mf *MockFilter) Invoke(invoker protocol.Invoker, invocation protocol.Invocation) protocol.Result {
return invoker.Invoke(invocation)
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment