retry

package
v0.0.0-...-ff9695f Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTimeout = errors.New("timed out waiting for the function to complete")
)

Functions

func OnError

func OnError(ctx context.Context, retriable RetriableFn, fn func(ctx context.Context) error, opts ...RetryOption) error

Types

type RetriableFn

type RetriableFn func(error) bool

type RetryOption

type RetryOption func(*RetryOptions)

func WithLogger

func WithLogger(logger logr.Logger) RetryOption

func WithRetryIntervalSec

func WithRetryIntervalSec(intervalSec int) RetryOption

func WithRetryTimoutSec

func WithRetryTimoutSec(timeoutSec int) RetryOption

type RetryOptions

type RetryOptions struct {
	Interval time.Duration
	Timeout  time.Duration
	Logger   logr.Logger
}

Jump to

Keyboard shortcuts

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