retry

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jan 27, 2026 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Overview

Package retry holds a helper function for retrying a task.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithConstantWait

func WithConstantWait(f func() error, options Options) error

WithConstantWait tries to execute the task and if it fails, awaits the specified duration before retrying maxAttempts times.

Types

type Options

type Options struct {
	Task         string
	MaxAttempts  int
	Wait         time.Duration
	InitialDelay time.Duration
	Verbose      bool
}

Jump to

Keyboard shortcuts

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