runtime

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func HandleReconcileError

func HandleReconcileError(err error, log logr.Logger) (ctrl.Result, error)

HandleReconcileError will handle errors from reconcile handlers, which respects runtime errors.

func NewConciseLogger

func NewConciseLogger(logger logr.Logger) logr.Logger

NewConciseLogger constructs new conciseLogger

func RetryImmediateOnError

func RetryImmediateOnError(interval time.Duration, timeout time.Duration, retryable func(error) bool, fn func() error) error

RetryImmediateOnError tries to run fn every interval until it succeeds, a non-retryable error occurs or the timeout is reached.

Types

type RequeueNeeded

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

An error to instruct controller-runtime to requeue the processing item without been logged as error. This should be used when a "error condition" occurrence is sort of expected and can be resolved by retry. e.g. a dependency haven't been fulfilled yet.

func NewRequeueNeeded

func NewRequeueNeeded(reason string) *RequeueNeeded

NewRequeueNeeded constructs new RequeueError to instruct controller-runtime to requeue the processing item without been logged as error.

func (*RequeueNeeded) Error

func (e *RequeueNeeded) Error() string

func (*RequeueNeeded) Reason

func (e *RequeueNeeded) Reason() string

type RequeueNeededAfter

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

An error to instruct controller-runtime to requeue the processing item after specified duration without been logged as error. This should be used when a "error condition" occurrence is sort of expected and can be resolved by retry. e.g. a dependency haven't been fulfilled yet, and expected it to be fulfilled after duration. Note: use this with care,a simple wait might suits your use case better.

func NewRequeueNeededAfter

func NewRequeueNeededAfter(reason string, duration time.Duration) *RequeueNeededAfter

NewRequeueNeededAfter constructs new RequeueNeededAfter to instruct controller-runtime to requeue the processing item after specified duration without been logged as error.

func (*RequeueNeededAfter) Duration

func (e *RequeueNeededAfter) Duration() time.Duration

func (*RequeueNeededAfter) Error

func (e *RequeueNeededAfter) Error() string

func (*RequeueNeededAfter) Reason

func (e *RequeueNeededAfter) Reason() string

Jump to

Keyboard shortcuts

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