retry

package
v3.33.2 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(callback func(*Stats) error, config *Config) error

Types

type Config

type Config struct {
	Maximum  int
	Interval time.Duration
	Forever  bool
	Jitter   bool
}

type Stats

type Stats struct {
	Attempt  int
	Interval time.Duration
	Config   *Config
	// contains filtered or unexported fields
}

func (*Stats) Break

func (s *Stats) Break()

Allow a retry loop to break out of itself

func (*Stats) String

func (s *Stats) String() string

A human readable representation often useful for debugging.

Jump to

Keyboard shortcuts

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