aurestretry

package
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 26, 2022 License: MIT Imports: 4 Imported by: 1

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.

Types

type RetryImpl

type RetryImpl struct {
	Wrapped     aurestclientapi.Client
	RepeatCount uint8

	RetryCondition aurestclientapi.RetryConditionCallback
	BeforeRetry    aurestclientapi.BeforeRetryCallback

	RetryingMetricsCallback aurestclientapi.MetricsCallbackFunction
	GivingUpMetricsCallback aurestclientapi.MetricsCallbackFunction
}

func (*RetryImpl) Perform

func (c *RetryImpl) Perform(ctx context.Context, method string, requestUrl string, requestBody interface{}, response *aurestclientapi.ParsedResponse) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL