retry

package
v0.51.0 Latest Latest
Warning

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

Go to latest
Published: Jan 23, 2023 License: Apache-2.0 Imports: 11 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IfNecessary added in v0.49.0

func IfNecessary(ctx context.Context, operation func() error, options *Options) error

IfNecessary retries the operation in exponential backoff with the retry Options.

func RetryIfNecessary

func RetryIfNecessary(ctx context.Context, operation func() error, options *Options) error

RetryIfNecessary deprecated function use IfNecessary.

Types

type Options added in v0.49.0

type Options struct {
	MaxRetry int           // The number of times to possibly retry.
	Delay    time.Duration // The delay to use between retries, if set.
}

Options defines the option to retry.

type RetryOptions

type RetryOptions = Options // nolint:revive

RetryOptions is deprecated, use Options.

Jump to

Keyboard shortcuts

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