Documentation ¶
Index ¶
- type Client
- func (hhc *Client) Delete(url string, headers http.Header) (*http.Response, error)
- func (hhc *Client) Do(request *http.Request) (*http.Response, error)
- func (hhc *Client) Get(url string, headers http.Header) (*http.Response, error)
- func (hhc *Client) Patch(url string, body io.Reader, headers http.Header) (*http.Response, error)
- func (hhc *Client) Post(url string, body io.Reader, headers http.Header) (*http.Response, error)
- func (hhc *Client) Put(url string, body io.Reader, headers http.Header) (*http.Response, error)
- type Option
- func WithCommandName(name string) Option
- func WithErrorPercentThreshold(errorPercentThreshold int) Option
- func WithFallbackFunc(fn fallbackFunc) Option
- func WithHTTPClient(client heimdall.Doer) Option
- func WithHTTPTimeout(timeout time.Duration) Option
- func WithHystrixTimeout(timeout time.Duration) Option
- func WithMaxConcurrentRequests(maxConcurrentRequests int) Option
- func WithRequestVolumeThreshold(requestVolumeThreshold int) Option
- func WithRetrier(retrier heimdall.Retriable) Option
- func WithRetryCount(retryCount int) Option
- func WithSleepWindow(sleepWindow int) Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client is the hystrix client implementation
type Option ¶
type Option func(*Client)
Option represents the hystrix client options
func WithCommandName ¶
WithCommandName sets the hystrix command name
func WithErrorPercentThreshold ¶
WithErrorPercentThreshold sets hystrix error percent threshold
func WithFallbackFunc ¶
func WithFallbackFunc(fn fallbackFunc) Option
WithFallbackFunc sets the fallback function
func WithHTTPClient ¶
WithHTTPClient sets a custom http client for hystrix client
func WithHTTPTimeout ¶
WithHTTPTimeout sets hystrix timeout
func WithHystrixTimeout ¶
WithHystrixTimeout sets hystrix timeout
func WithMaxConcurrentRequests ¶
WithMaxConcurrentRequests sets hystrix max concurrent requests
func WithRequestVolumeThreshold ¶
WithRequestVolumeThreshold sets hystrix request volume threshold
func WithRetrier ¶
WithRetrier sets the strategy for retrying
func WithRetryCount ¶
WithRetryCount sets the retry count for the Client
func WithSleepWindow ¶
WithSleepWindow sets hystrix sleep window