retrystrategy

package
v0.0.0-...-73df0bb Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2018 License: Apache-2.0, 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() (bool, 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