operatorerrors

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InvalidDeploymentCreateRequest     = 1
	InvalidDeploymentUpdateRequest     = 2
	InvalidServiceCreateRequest        = 3
	InvalidServiceUpdateRequest        = 4
	InvalidPVCCreateRequest            = 5
	InvalidPVCUpdateRequest            = 6
	InvalidConfigMapCreateRequest      = 7
	InvalidConfigMapUpdateRequest      = 8
	InvalidServiceAccountCreateRequest = 9
	InvalidServiceAccountUpdateRequest = 10
	InvalidRoleCreateRequest           = 11
	InvalidRoleUpdateRequest           = 12
	InvalidRoleBindingCreateRequest    = 13
	InvalidRoleBindingUpdateRequest    = 14
	InvalidPeerInitSpec                = 15
	InvalidOrdererType                 = 16
	InvalidOrdererNodeCreateRequest    = 17
	InvalidOrdererNodeUpdateRequest    = 18
	InvalidOrdererInitSpec             = 19
	CAInitilizationFailed              = 20
	OrdererInitilizationFailed         = 21
	PeerInitilizationFailed            = 22
	MigrationFailed                    = 23
	FabricPeerMigrationFailed          = 24
	FabricOrdererMigrationFailed       = 25
	InvalidCustomResourceCreateRequest = 26
	FabricCAMigrationFailed            = 27
)

Variables

Functions

func GetErrorCode

func GetErrorCode(err error) int

func IsBreakingError

func IsBreakingError(err error, msg string, log logr.Logger) error

Types

type Causer

type Causer interface {
	Cause() error
}

type OperatorError

type OperatorError struct {
	Code    int
	Message string
}

func IsOperatorError

func IsOperatorError(err error) *OperatorError

GetCause gets the root cause of the error

func New

func New(code int, msg string) *OperatorError

func Wrap

func Wrap(err error, code int, msg string) *OperatorError

func (*OperatorError) Error

func (e *OperatorError) Error() string

func (*OperatorError) String

func (e *OperatorError) String() string

Jump to

Keyboard shortcuts

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