Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Instrument ¶ added in v0.4.0
func Instrument( client aurestclientapi.Client, retryingMetricsCallback aurestclientapi.MetricsCallbackFunction, givingUpMetricsCallback aurestclientapi.MetricsCallbackFunction, )
Instrument adds instrumentation to a http client.
Either of the callbacks may be nil.
func New ¶
func New( wrapped aurestclientapi.Client, repeatCount uint8, condition aurestclientapi.RetryConditionCallback, beforeRetryOrNil aurestclientapi.BeforeRetryCallback, ) aurestclientapi.Client
func NewWithOptions ¶ added in v0.8.0
func NewWithOptions( wrapped aurestclientapi.Client, condition aurestclientapi.RetryConditionCallback, opts RetryOptions, ) aurestclientapi.Client
Types ¶
type RetryImpl ¶
type RetryImpl struct {
Wrapped aurestclientapi.Client
RepeatCount uint8
RetryCondition aurestclientapi.RetryConditionCallback
BeforeRetry aurestclientapi.BeforeRetryCallback
RetryingMetricsCallback aurestclientapi.MetricsCallbackFunction
GivingUpMetricsCallback aurestclientapi.MetricsCallbackFunction
SilenceGivingUp bool
}
func (*RetryImpl) Perform ¶
func (c *RetryImpl) Perform(ctx context.Context, method string, requestUrl string, requestBody interface{}, response *aurestclientapi.ParsedResponse) error
type RetryOptions ¶ added in v0.8.0
type RetryOptions struct {
RepeatCount uint8
BeforeRetryOrNil aurestclientapi.BeforeRetryCallback
SilenceGivingUp bool
}
Click to show internal directories.
Click to hide internal directories.