Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Configure ¶
func Configure(cmds map[string]CommandConfig)
Configure applies settings for a set of circuits.
func ConfigureCommand ¶
func ConfigureCommand(name string, config CommandConfig)
ConfigureCommand applies settings for a circuit.
func ConfigureDefault ¶
func ConfigureDefault(config CommandConfig)
ConfigureDefault applies default settings for all circuits.
func NewClientWrapper ¶
NewClientWrapper returns a hystrix client Wrapper.
Types ¶
type CommandConfig ¶
type CommandConfig struct { Timeout int MaxConcurrentRequests int RequestVolumeThreshold int SleepWindow int ErrorPercentThreshold int }
CommandConfig is used to tune circuit settings at runtime.
type Option ¶
type Option func(*Options)
Option represents options update func.
func WithFallback ¶
WithFallback used to set fallback func for options.
type Options ¶
type Options struct { // Filter used to prevent errors from trigger circuit breaker. // return true if you want to ignore target error Filter func(context.Context, error) bool // Fallback used to define some code to execute during outages. Fallback func(context.Context, error) error }
Options represents hystrix client wrapper options.
Click to show internal directories.
Click to hide internal directories.