kubernetes: k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff Index | Files

package exponentialbackoff

import "k8s.io/kubernetes/pkg/util/goroutinemap/exponentialbackoff"

Package exponentialbackoff contains logic for implementing exponential backoff for GoRoutineMap and NestedPendingOperations.

Index

Package Files

exponential_backoff.go

func IsExponentialBackoff Uses

func IsExponentialBackoff(err error) bool

IsExponentialBackoff returns true if an error returned from GoroutineMap indicates that a new operation can not be started because exponentialBackOffOnError is enabled and a previous operation with the same operation failed within the durationBeforeRetry period.

func NewExponentialBackoffError Uses

func NewExponentialBackoffError(
    operationName string, expBackoff ExponentialBackoff) error

NewExponentialBackoffError returns a new instance of ExponentialBackoff error.

type ExponentialBackoff Uses

type ExponentialBackoff struct {
    // contains filtered or unexported fields
}

ExponentialBackoff contains the last occurrence of an error and the duration that retries are not permitted.

func (*ExponentialBackoff) GenerateNoRetriesPermittedMsg Uses

func (expBackoff *ExponentialBackoff) GenerateNoRetriesPermittedMsg(operationName string) string

func (*ExponentialBackoff) SafeToRetry Uses

func (expBackoff *ExponentialBackoff) SafeToRetry(operationName string) error

SafeToRetry returns an error if the durationBeforeRetry period for the given lastErrorTime has not yet expired. Otherwise it returns nil.

func (*ExponentialBackoff) Update Uses

func (expBackoff *ExponentialBackoff) Update(err *error)

Package exponentialbackoff imports 2 packages (graph) and is imported by 132 packages. Updated 2017-11-19. Refresh now. Tools for package owners.