backoff

package
v0.9.36 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2021 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Const

type Const time.Duration

func (Const) Timeout

func (b Const) Timeout(int) time.Duration

type Exp

type Exp struct {
	Base  int64
	Power int64
}

func (Exp) Timeout

func (b Exp) Timeout(try int) time.Duration

type Interface

type Interface interface {
	Timeout(try int) time.Duration
}

type Retry

type Retry struct {
	Retries int
	Backoff Interface
	Body    func(context.Context) error
}

func (Retry) Do

func (r Retry) Do(ctx context.Context) (err error)

type Temporary

type Temporary interface {
	IsTemporary(err error) bool
}

Jump to

Keyboard shortcuts

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