retrystrategy

package
v0.0.0-...-b082aa9 Latest Latest
Warning

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

Go to latest
Published: May 25, 2018 License: Apache-2.0 Imports: 2 Imported by: 0

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 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