runtime_retry

package
v0.2.4 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AlwaysTry

func AlwaysTry(err error) bool

func GetTryCount

func GetTryCount(ctx context.Context) int64

func SetTryCount

func SetTryCount(ctx context.Context, trycount int64) context.Context

func Stopped

func Stopped() error

func WithAbsorbError added in v0.0.14

func WithAbsorbError(absorb bool) runtime.Configuration[*Retry]

func WithAttempts added in v0.0.14

func WithAttempts(attempts uint) runtime.Configuration[*Retry]

func WithDelay added in v0.0.14

func WithDelay(delay time.Duration) runtime.Configuration[*Retry]

func WithMaxDelay added in v0.0.14

func WithMaxDelay(delay time.Duration) runtime.Configuration[*Retry]

func WithRetryOption

func WithRetryOption(options ...retry.Option) runtime.Configuration[*Retry]

configurations

Types

type Retry

type Retry struct {
	// contains filtered or unexported fields
}

implementation

func NewRetry

func NewRetry(configurations ...runtime.Configuration[*Retry]) *Retry

constructor

func (*Retry) Do

func (c *Retry) Do(fnToDo func(int64) error) error

func (*Retry) Start

func (c *Retry) Start() error

func (*Retry) Stop

func (c *Retry) Stop()

Jump to

Keyboard shortcuts

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