Import path:
gitlab.soludian.com/soludian/fountain/libs/resilient/circuit_breaker
circuit_breaker
import "gitlab.soludian.com/soludian/fountain/libs/resilient/circuit_breaker"Index
- func GoBreaker(cb *gobreaker.CircuitBreaker) endpoint.Middleware
- func HandyBreaker(cb breaker.Breaker) endpoint.Middleware
- func Hystrix(commandName string) endpoint.Middleware
func GoBreaker
func GoBreaker(cb *gobreaker.CircuitBreaker) endpoint.MiddlewareGobreaker returns an endpoint.Middleware that implements the circuit breaker pattern using the sony/gobreaker package. Only errors returned by the wrapped endpoint count against the circuit breaker's error count.
See http://godoc.org/github.com/sony/gobreaker for more information.
func HandyBreaker
func HandyBreaker(cb breaker.Breaker) endpoint.MiddlewareHandyBreaker returns an endpoint.Middleware that implements the circuit breaker pattern using the streadway/handy/breaker package. Only errors returned by the wrapped endpoint count against the circuit breaker's error count.
See http://godoc.org/github.com/streadway/handy/breaker for more information.
func Hystrix
func Hystrix(commandName string) endpoint.MiddlewareHystrix returns an endpoint.Middleware that implements the circuit breaker pattern using the afex/hystrix-go package.
When using this circuit breaker, please configure your commands separately.
See https://godoc.org/github.com/afex/hystrix-go/hystrix for more information.
Generated by gomarkdoc