Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializeClient ¶
func InitializeClient(hystrixCommand string, connectionPoolConfig ConnectionPoolConfig, hystrixConfig HystrixResiliencyConfig, retriable heimdall.Retriable, retryCount int, fallbackFunc func(error) error) (*hystrix.Client, error)
InitializeClient initialises the client
Types ¶
type ConnectionPoolConfig ¶
type HystrixResiliencyConfig ¶
type HystrixResiliencyConfig struct {
// MaxConcurrentRequests is the maximum number of concurrent requests allowed
// Default is 100
MaxConcurrentRequests int `yaml:"maxConcurrentRequests"`
// RequestVolumeThreshold is the minimum number of requests needed before a circuit can be tripped due to health
// Default is 20
RequestVolumeThreshold int `yaml:"requestVolumeThreshold"`
// CircuitBreakerSleepWindow is how long, in milliseconds, to wait after a circuit opens before testing for recovery
// Default is 5000
CircuitBreakerSleepWindow int `yaml:"circuitBreakerSleepWindow"`
// ErrorPercentThreshold causes circuits to open once the rolling measure of errors exceeds this percent of requests
// Default is 50
ErrorPercentThreshold int `yaml:"errorPercentThreshold"`
// CircuitBreakerTimeout is how long to wait for command to complete, in milliseconds
// Default is 1000
CircuitBreakerTimeout int `yaml:"circuitBreakerTimeout"`
}
Click to show internal directories.
Click to hide internal directories.