common

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: May 20, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetComplianceOperatorNamespace

func GetComplianceOperatorNamespace() string

GetComplianceOperatorNamespace gets the namespace that the operator is currently running on.

func IsRetriable

func IsRetriable(err error) bool

IsRetriable returns whether the error is retriable or not using the NonRetriableCtrlError interface

func ReturnWithRetriableError

func ReturnWithRetriableError(log logr.Logger, err error) (reconcile.Result, error)

ReturnWithRetriableError will check if the error is retriable we return it. If it's not retriable, we return nil so the reconciler doesn't keep looping.

Types

type NonRetriableCtrlError

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

NonRetriableCtrlError wraps errors with the addition of having the information for the error being non-retriable

func NewNonRetriableCtrlError added in v0.1.9

func NewNonRetriableCtrlError(errorFmt string, args ...interface{}) *NonRetriableCtrlError

NewNonRetriableCtrlError creates an error with the RetriableCtrlError interface

func WrapNonRetriableCtrlError

func WrapNonRetriableCtrlError(err error) *NonRetriableCtrlError

WrapNonRetriableCtrlError wraps an error with the RetriableCtrlError interface

func (NonRetriableCtrlError) Error

func (cerr NonRetriableCtrlError) Error() string

func (NonRetriableCtrlError) IsRetriable

func (cerr NonRetriableCtrlError) IsRetriable() bool

IsRetriable exposes if the error is retriable or not

Jump to

Keyboard shortcuts

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