Documentation
¶
Index ¶
- Variables
- func Do(name string, req func() error) error
- func DoWithAcceptable(name string, req func() error, acceptable Acceptable) error
- func DoWithFallback(name string, req func() error, fallback func(err error) error) error
- func DoWithFallbackAcceptable(name string, req func() error, fallback func(err error) error, ...) error
- func NoBreakerFor(name string)
- type Acceptable
- type Breaker
- type Option
- type Promise
Constants ¶
This section is empty.
Variables ¶
ErrServiceUnavailable is returned when the Breaker state is open.
Functions ¶
func DoWithAcceptable ¶
func DoWithAcceptable(name string, req func() error, acceptable Acceptable) error
DoWithAcceptable calls Breaker.DoWithAcceptable on the Breaker with given name.
func DoWithFallback ¶
DoWithFallback calls Breaker.DoWithFallback on the Breaker with given name.
func DoWithFallbackAcceptable ¶
func DoWithFallbackAcceptable(name string, req func() error, fallback func(err error) error, acceptable Acceptable) error
DoWithFallbackAcceptable calls Breaker.DoWithFallbackAcceptable on the Breaker with given name.
func NoBreakerFor ¶
func NoBreakerFor(name string)
NoBreakerFor disables the circuit breaker for the given name.
Types ¶
type Acceptable ¶
Acceptable is the func to check if the error can be accepted.