retry

package
v0.47.0 Latest Latest
Warning

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

Go to latest
Published: Jan 20, 2022 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