errors

package
v1.1.9 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2023 License: UPL-1.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConditionStatus

func GetConditionStatus(err common.ServiceError) metav1.ConditionStatus

GetConditionStatus returns the state of the condition based on the error returned from Control plane

func GetErrorMessage

func GetErrorMessage(err common.ServiceError) string

GetErrorMessage returns the error message along with the opcRequestId in it

func GetMeshConfiguredConditionStatus

func GetMeshConfiguredConditionStatus(err common.ServiceError) metav1.ConditionStatus

GetMeshConfiguredConditionStatus returns the state of the MeshConfigured condition based on the error returned from Control plane

func GetOsokResponseByHandlingReconcileError

func GetOsokResponseByHandlingReconcileError(err error) (servicemanager.OSOKResponse, error)

func GetValidationErrorMessage

func GetValidationErrorMessage(object client.Object, reason string) string

func HandleErrorAndRequeue

func HandleErrorAndRequeue(ctx context.Context, err error, log loggerutil.OSOKLogger) (ctrl.Result, error)

func IsDeleted

func IsDeleted(ctx context.Context, err error, log loggerutil.OSOKLogger) error

func IsNetworkErrorOrInternalError

func IsNetworkErrorOrInternalError(err error) bool

func ResponseStatusText

func ResponseStatusText(err common.ServiceError) string

Types

type DoNotRequeueError added in v1.1.2

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

func NewDoNotRequeueError added in v1.1.2

func NewDoNotRequeueError(err error) *DoNotRequeueError

func (*DoNotRequeueError) Error added in v1.1.2

func (e *DoNotRequeueError) Error() string

type RequeueAfterError

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

RequeueAfterError is used when a request needs to be requeued after some time due to an error.

func NewRequeueAfter

func NewRequeueAfter(duration time.Duration) *RequeueAfterError

func NewRequeueAfterError

func NewRequeueAfterError(err error, duration time.Duration) *RequeueAfterError

func (*RequeueAfterError) Error

func (e *RequeueAfterError) Error() string

type RequeueOnError

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

RequeueOnError is to used when a request needs to be requeued immediately due to an error.

func NewRequeueOnError

func NewRequeueOnError(err error) *RequeueOnError

func (*RequeueOnError) Error

func (e *RequeueOnError) Error() string

Jump to

Keyboard shortcuts

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