Documentation
¶
Index ¶
- type Client
- type Option
- func WithEnableInfoLogging(enable bool) Option
- func WithHeaders(Headers map[string]string) Option
- func WithProxy(proxy string) Option
- func WithRetryCondition(fn func(r *resty.Response, err error) bool) Option
- func WithRetryCount(retryCount int) Option
- func WithRetryWaitTime(timeout time.Duration) Option
- func WithTimeout(timeout time.Duration) Option
- func WithUnifyRequestHostHook(unifyRequestHostHook func(url *url.URL) string) Option
- func WithUnifyRequestURIHook(unifyRequestURIHook func(url *url.URL) string) Option
- type RetryCondition
- type UnifyRequestHostHook
- type UnifyRequestURIHook
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Option ¶
type Option interface {
Apply(*config)
}
Option applies an option to a config.
func WithEnableInfoLogging ¶
WithEnableInfoLogging set if enable log information
func WithRetryCondition ¶
WithRetryCondition set retry condition
func WithRetryWaitTime ¶
WithRetryWaitTime set retry wait time
type RetryCondition ¶
func (RetryCondition) Apply ¶
func (r RetryCondition) Apply(c *config)
type UnifyRequestHostHook ¶
func (UnifyRequestHostHook) Apply ¶
func (hook UnifyRequestHostHook) Apply(c *config)
type UnifyRequestURIHook ¶
func (UnifyRequestURIHook) Apply ¶
func (hook UnifyRequestURIHook) Apply(c *config)
Click to show internal directories.
Click to hide internal directories.