retry

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Do

func Do(ctx context.Context, p Policy, fn func() error) error

Types

type Config

type Config struct {
	Attempts int    `json:"attempts" yaml:"attempts"`
	Backoff  string `json:"backoff" yaml:"backoff"`
}

type Policy

type Policy struct {
	Attempts int
	Backoff  time.Duration
}

func NewPolicy

func NewPolicy(cfg Config) Policy

func NewPolicyFromStrings

func NewPolicyFromStrings(attempts, backoff string) Policy

Jump to

Keyboard shortcuts

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