Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FallbackFunction ¶
FallbackFunction for hystrix fallback func
Types ¶
type Config ¶
type Config struct {
Timeout time.Duration `default:"3000ms"`
MaxConcurrentRequests int `default:"100"`
ErrorPercentThreshold int `default:"10"`
SleepWindow int `default:"20"`
RequestVolumeThreshold int `default:"100"`
RetryCount int `default:"3"`
BackoffInitialTimeout time.Duration `default:"1000ms"`
BackoffMaxTimeout time.Duration `default:"5000ms"`
BackoffJitterInterval time.Duration `default:"200ms"`
BackoffExponentFactor float64 `default:"2"`
ProxyUrl string
}
func DefaultConfig ¶
func DefaultConfig() Config
type HTTPClient ¶
type HTTPClient interface {
Get(url string, headers map[string]string) (*http.Response, error)
Post(url string, body io.Reader, headers map[string]string) (res *http.Response, err error)
Put(url string, body io.Reader, headers map[string]string) (res *http.Response, err error)
Delete(url string, headers map[string]string) (res *http.Response, err error)
AddPlugin(plg heimdall.Plugin)
}
Click to show internal directories.
Click to hide internal directories.