Help us shape the future of Go! Take the 2026 Go Developer Survey

retrystrategy

package
v0.0.665 Latest Latest
Warning

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

Go to latest
Published: Oct 20, 2026 License: Apache-2.0 Imports: 3 Imported by: 286

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Clock

type Clock interface {
	Sleep(time.Duration)
	Now() time.Time
}

type RetryStrategy

type RetryStrategy interface {
	Try() error
}

func NewAttemptRetryStrategy

func NewAttemptRetryStrategy(
	maxAttempts int,
	delay time.Duration,
	retryable Retryable,
	logger boshlog.Logger,
) RetryStrategy

func NewBackoffWithJitterRetryStrategy

func NewBackoffWithJitterRetryStrategy(
	maxAttempts int,
	min time.Duration,
	max time.Duration,
	retryable Retryable,
	logger boshlog.Logger,
) RetryStrategy

func NewTimeoutRetryStrategy

func NewTimeoutRetryStrategy(
	timeout time.Duration,
	delay time.Duration,
	retryable Retryable,
	timeService Clock,
	logger boshlog.Logger,
) RetryStrategy

func NewUnlimitedRetryStrategy

func NewUnlimitedRetryStrategy(
	delay time.Duration,
	retryable Retryable,
	logger boshlog.Logger,
) RetryStrategy

type Retryable

type Retryable interface {
	Attempt() (shouldRetry bool, err error)
}

func NewRetryable

func NewRetryable(attemptFunc func() (bool, error)) Retryable

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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