backoff

package
v0.24.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type None

type None int

None is empty delay sequence

func Empty

func Empty() None

func (None) Retry

func (None) Retry(f func() error) (err error)

type Seq

type Seq func() []time.Duration

Seq is a sequence of delays

func Const

func Const(delay time.Duration, n int) Seq

Const is a sequence of constant delays

func Exp

func Exp(delay time.Duration, n int, factor float64) Seq

Exp is a sequence of exponential delays

func Linear

func Linear(delay time.Duration, n int) Seq

Linear is a sequence of constant delays

func (Seq) Deadline

func (seq Seq) Deadline(t time.Duration) Seq

Deadline defines a total time for the delay

func (Seq) Retry

func (seq Seq) Retry(f func() error) (err error)

Retry function

func (Seq) Seq

func (seq Seq) Seq() []time.Duration

Seq of time delays

Jump to

Keyboard shortcuts

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