Versions in this module Expand all Collapse all v0 v0.1.0 Apr 2, 2024 Changes in this version + type BackoffPolicy struct + func NewBackoffPolicy(configMap map[string]interface{}) *BackoffPolicy + func (bop *BackoffPolicy) SetConstantBackoff(constantBackoff *ConstantBackoff) *BackoffPolicy + func (bop *BackoffPolicy) SetExponentialBackoff(exponentialBackoff *ExponentialBackoff) *BackoffPolicy + type Client struct + func ConfigureHTTPClient(requestConfigs ...*RequestConfig) *Client + func (c *Client) Request(request *Request) (*http.Response, error) + func (c *Client) WithLogger(l Logger) *Client + func (c *Client) WithMetrics(m Metrics) *Client + type ClientRequestMapping struct + type ConstantBackoff struct + func NewConstantBackoff(configMap map[string]interface{}) *ConstantBackoff + func (cb *ConstantBackoff) SetInterval(interval time.Duration) *ConstantBackoff + func (cb *ConstantBackoff) SetMaximumJitterInterval(maximumJitterInterval time.Duration) *ConstantBackoff + type ExponentialBackoff struct + func NewExponentialBackoff(configMap map[string]interface{}) *ExponentialBackoff + func (eb *ExponentialBackoff) SetExponentFactor(exponentFactor float64) *ExponentialBackoff + func (eb *ExponentialBackoff) SetInitialTimeout(initialTimeout time.Duration) *ExponentialBackoff + func (eb *ExponentialBackoff) SetMaxTimeout(maxTimeout time.Duration) *ExponentialBackoff + func (eb *ExponentialBackoff) SetMaximumJitterInterval(maximumJitterInterval time.Duration) *ExponentialBackoff + type HystrixConfig struct + func NewHystrixConfig(configMap map[string]interface{}) *HystrixConfig + func (hc *HystrixConfig) SetErrorPercentThreshold(errorPercentThreshold int) *HystrixConfig + func (hc *HystrixConfig) SetFallback(fallbackFn func(error) error) *HystrixConfig + func (hc *HystrixConfig) SetHystrixTimeout(hystrixTimeout time.Duration) *HystrixConfig + func (hc *HystrixConfig) SetMaxConcurrentRequests(maxConcurrentRequests int) *HystrixConfig + func (hc *HystrixConfig) SetRequestVolumeThreshold(requestVolumeThreshold int) *HystrixConfig + func (hc *HystrixConfig) SetSleepWindowInMillis(sleepWindowInMillis int) *HystrixConfig + type Logger func(ctx context.Context, msg string) + type Metric struct + LatencyInMillis int64 + Status int + type Metrics func(ctx context.Context, name string, m Metric) + type Request struct + func NewRequest(name string) *Request + func (req *Request) SetBody(body io.Reader) *Request + func (req *Request) SetContext(ctx context.Context) *Request + func (req *Request) SetHeaderParam(param, value string) *Request + func (req *Request) SetHeaderParams(headerParams map[string]string) *Request + func (req *Request) SetMethod(method string) *Request + func (req *Request) SetQueryParam(param, value string) *Request + func (req *Request) SetQueryParams(queryParams map[string]string) *Request + func (req *Request) SetURL(url string) *Request + type RequestConfig struct + func NewRequestConfig(name string, configMap map[string]interface{}) *RequestConfig + func (rc *RequestConfig) SetBackoffPolicy(backoffPolicy *BackoffPolicy) *RequestConfig + func (rc *RequestConfig) SetCheckRedirect(checkRedirect func(*http.Request, []*http.Request) error) *RequestConfig + func (rc *RequestConfig) SetConnectTimeout(connectTimeout time.Duration) *RequestConfig + func (rc *RequestConfig) SetExpectContinueTimeout(expectContinueTimeout time.Duration) *RequestConfig + func (rc *RequestConfig) SetHeaderParams(headers map[string]interface{}) *RequestConfig + func (rc *RequestConfig) SetHystrixConfig(hystrixConfig *HystrixConfig) *RequestConfig + func (rc *RequestConfig) SetHystrixFallback(fallbackFn func(error) error) *RequestConfig + func (rc *RequestConfig) SetIdleConnectionTimeout(idleConnectionTimeout time.Duration) *RequestConfig + func (rc *RequestConfig) SetKeepAlive(keepalive time.Duration) *RequestConfig + func (rc *RequestConfig) SetMaxIdleConnections(maxIdleConnections int) *RequestConfig + func (rc *RequestConfig) SetMethod(method string) *RequestConfig + func (rc *RequestConfig) SetName(name string) *RequestConfig + func (rc *RequestConfig) SetProxy(proxyURL string) *RequestConfig + func (rc *RequestConfig) SetRetryCount(retryCount int) *RequestConfig + func (rc *RequestConfig) SetTLSHandshakeTimeout(tlsHandshakeTimeout time.Duration) *RequestConfig + func (rc *RequestConfig) SetTimeout(timeout time.Duration) *RequestConfig + func (rc *RequestConfig) SetTransport(transport http.RoundTripper) *RequestConfig + func (rc *RequestConfig) SetURL(url string) *RequestConfig + func (rc *RequestConfig) Transport() http.RoundTripper