retry

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(ctx context.Context, fn func() error, options ...PolicyOption) error

Do calls the provided function with the provided PolicyOption(s).

Types

type Policy

type Policy struct {
	MinDelay   time.Duration
	MaxDelay   time.Duration
	MaxRetries int
	Retry      retry
	Backoff    backoff
}

Policy contains rules for retries.

type PolicyOption

type PolicyOption func(o *Policy)

PolicyOption sets a policy option.

Jump to

Keyboard shortcuts

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