retry

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultOptions = []retry.Option{
	retry.LastErrorOnly(true),
	retry.Delay(time.Second),
	retry.DelayType(retry.FixedDelay),
}

Functions

This section is empty.

Types

type Config

type Config[T any] struct {
	If      func(err error) bool
	Options []retry.Option
}

func OnErrorConfig

func OnErrorConfig[T any](attemptCount uint, check func(error) bool) Config[T]

func (Config[T]) Do

func (rc Config[T]) Do(f retry.RetryableFuncWithData[T]) (T, error)

Jump to

Keyboard shortcuts

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