retry

package
v0.38.6 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2021 License: Apache-2.0 Imports: 12 Imported by: 24

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RetryIfNecessary

func RetryIfNecessary(ctx context.Context, operation func() error, retryOptions *RetryOptions) error

RetryIfNecessary retries the operation in exponential backoff with the retryOptions

Types

type RetryOptions

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

RetryOptions defines the option to retry

Jump to

Keyboard shortcuts

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