retryer

package module
v0.0.0-...-6387faf Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunWithRetries

func RunWithRetries(ctx context.Context, options *OptionRetries, f retry.RetryFunc) (err error)

Types

type OptionDuration

type OptionDuration time.Duration

func (*OptionDuration) MarshalText

func (od *OptionDuration) MarshalText() ([]byte, error)

func (*OptionDuration) String

func (od *OptionDuration) String() string

func (*OptionDuration) UnmarshalText

func (od *OptionDuration) UnmarshalText(b []byte) (err error)

type OptionRetries

type OptionRetries struct {
	Type           string         `yaml:"type" json:"type"`
	Base           OptionDuration `yaml:"base" json:"base"`
	CappedDuration OptionDuration `yaml:"capped_duration" json:"capped_duration"`
	JitterPercent  uint64         `yaml:"jitter_percent" json:"jitter_percent"`
	MaxDuration    OptionDuration `yaml:"max_duration" json:"max_duration"`
}

Jump to

Keyboard shortcuts

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