retry

package
v0.3.37 Latest Latest
Warning

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

Go to latest
Published: Jun 2, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Times defines the default max amount of times to retry a request.
	Times = 3

	// Wait defines the default amount of time to wait before each retry attempt.
	Wait = 100 * time.Millisecond
)

Variables

This section is empty.

Functions

func Every

func Every(factor time.Duration) *retry

func Retry

func Retry(factor time.Duration, handle ...interface{}) error

func With

func With(factor time.Duration) *retry

Types

type Transformation

type Transformation func(duration time.Duration) time.Duration

Transformation 对生成的等待时间进行转换调整

Jump to

Keyboard shortcuts

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