aurestretry

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Sep 13, 2024 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.

func NewWithOptions added in v0.8.0

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
}

Jump to

Keyboard shortcuts

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