Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backoff ¶
type Backoff = httpclient.Backoff
Backoff interface defines contract for backoff strategies
func NewConstantBackoff ¶
NewConstantBackoff returns an instance of ConstantBackoff
type Client ¶
type Client = httpclient.Client
func NewWithTracer ¶ added in v1.2.0
NewWithTracer returns a new instance of http client with tracer
type DoFunc ¶
type DoFunc = httpclient.DoFunc
type Middleware ¶
type Middleware = httpclient.Middleware
type Option ¶
type Option = httpclient.Option
Option represents the http client options
func WithHTTPTimeout ¶
WithHTTPTimeout sets hystrix timeout
func WithMiddleware ¶
func WithMiddleware(m Middleware) Option
WithMiddleware sets the strategy for retrying
func WithRetrier ¶
func WithRetrier(retrier httpclient.Retriable) Option
WithRetrier sets the strategy for retrying
func WithRetryCount ¶
WithRetryCount sets the retry count for the client
func WithTracerEnable ¶ added in v1.2.0
func WithTracerEnable() Option
WithTracerEnable sets the Tracer enable ture
func WithTransport ¶
func WithTransport(t http.RoundTripper) Option
WithTransport sets the Transport of client
type RequestOption ¶ added in v1.3.0
type RequestOption = httpclient.RequestOption
RequestOption http request option
func WithRequestContext ¶ added in v1.3.0
func WithRequestContext(ctx context.Context) RequestOption
func WithRequestRetrier ¶ added in v1.3.0
func WithRequestRetrier(retrier Retriable) RequestOption
func WithRequestRetryCount ¶ added in v1.3.0
func WithRequestRetryCount(count int) RequestOption
type RequestOptions ¶ added in v1.3.0
type RequestOptions = httpclient.RequestOptions
RequestOptions represents the http request options
type Retriable ¶
type Retriable = httpclient.Retriable
Retriable defines contract for retriers to implement
func NewRetrier ¶
NewRetrier returns retrier with some backoff strategy
func NewRetrierFunc ¶
func NewRetrierFunc(f RetriableFunc) Retriable
NewRetrierFunc returns a retrier with a retry function defined
type RetriableFunc ¶
type RetriableFunc = httpclient.RetriableFunc
RetriableFunc is an adapter to allow the use of ordinary functions as a Retriable