backoff

package
v0.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(op func() error, b backoff.BackOff) error

Do retries op if it returns an error according to the provided backoff

Types

type BackOff

type BackOff struct {
	// contains filtered or unexported fields
}

func New

func New() *BackOff

func (*BackOff) Exponential

func (b *BackOff) Exponential() backoff.BackOff

func (*BackOff) Linear

func (b *BackOff) Linear() backoff.BackOff

func (*BackOff) WithInitialDuration

func (b *BackOff) WithInitialDuration(initial time.Duration) *BackOff

func (*BackOff) WithMaxAttempts

func (b *BackOff) WithMaxAttempts(maxAttempts int) *BackOff

func (*BackOff) WithMaxDuration

func (b *BackOff) WithMaxDuration(max time.Duration) *BackOff

Jump to

Keyboard shortcuts

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