controllererrors

package
v0.0.0-...-4cb8c7d Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsErrorCode

func IsErrorCode(err error, code ErrorCode) bool

IsErrorCode matches error code to the error

Types

type Error

type Error struct {
	Code       ErrorCode
	Message    string
	InnerError error
}

Error is complex error type

func NewError

func NewError(code ErrorCode, message string) *Error

NewError creates new error

func NewErrorWithInnerError

func NewErrorWithInnerError(code ErrorCode, innerError error, message string) *Error

NewErrorWithInnerError creates new error

func NewErrorWithInnerErrorf

func NewErrorWithInnerErrorf(code ErrorCode, innerError error, message string, a ...interface{}) *Error

NewErrorWithInnerErrorf creates new error

func NewErrorf

func NewErrorf(code ErrorCode, message string, a ...interface{}) *Error

NewErrorf creates new error after formatting

func (*Error) Error

func (e *Error) Error() string

Error implements error interface to return error

type ErrorCode

type ErrorCode string

ErrorCode is string type for error codes

const (

	// appgw package
	ErrorServiceNotFound                           ErrorCode = "ErrorServiceNotFound"
	ErrorMultipleServiceBackendPortBinding         ErrorCode = "ErrorMultipleServiceBackendPortBinding"
	ErrorUnableToResolveBackendPortFromServicePort ErrorCode = "ErrorUnableToResolveBackendPortFromServicePort"
	ErrorServiceResolvedToInvalidPort              ErrorCode = "ErrorServiceResolvedToInvalidPort"
	ErrorGeneratingProbes                          ErrorCode = "ErrorGeneratingProbes"
	ErrorGeneratingBackendSettings                 ErrorCode = "ErrorGeneratingBackendSettings"
	ErrorCreatingBackendPools                      ErrorCode = "ErrorCreatingBackendPools"
	ErrorCreatingRewrites                          ErrorCode = "ErrorCreatingRewrites"
	ErrorGeneratingListeners                       ErrorCode = "ErrorGeneratingListeners"
	ErrorGeneratingRoutingRules                    ErrorCode = "ErrorGeneratingRoutingRules"
	ErrorNoDefaults                                ErrorCode = "ErrorNoDefaults"
	ErrorEitherDefaults                            ErrorCode = "ErrorEitherDefaults"
	ErrorNoBackendorRedirect                       ErrorCode = "ErrorNoBackendorRedirect"
	ErrorEitherBackendorRedirect                   ErrorCode = "ErrorEitherBackendorRedirect"
	ErrorNoPublicIP                                ErrorCode = "ErrorNoPublicIP"
	ErrorNoPrivateIP                               ErrorCode = "ErrorNoPrivateIP"
	ErrorEmptyConfig                               ErrorCode = "ErrorEmptyConfig"
	ErrorIstioResolvePortsForServices              ErrorCode = "ErrorIstioResolvePortsForServices"
	ErrorIstioMultipleServiceBackendPortBinding    ErrorCode = "ErrorIstioMultipleServiceBackendPortBinding"

	// k8sContext package
	ErrorEnpdointsNotFound              ErrorCode = "ErrorEnpdointsNotFound"
	ErrorFetchingEndpoints              ErrorCode = "ErrorFetchingEndpoints"
	ErrorFetchingMultiClusterService    ErrorCode = "ErrorFetchingMultiClusterService"
	ErrorFetchingBackendAddressPool     ErrorCode = "ErrorFetchingBackendAddressPool"
	ErrorFetchingRewrite                ErrorCode = "ErrorFetchingRewrite"
	ErrorFetchingInstanceUpdateStatus   ErrorCode = "ErrorFetchingInstanceUpdateStatus"
	ErrorInformersNotInitialized        ErrorCode = "ErrorInformersNotInitialized"
	ErrorFailedInitialCacheSync         ErrorCode = "ErrorFailedInitialCacheSync"
	ErrorUpdatingIngressStatus          ErrorCode = "ErrorUpdatingIngressStatus"
	ErrorFetchingNodes                  ErrorCode = "ErrorFetchingNodes"
	ErrorNoNodesFound                   ErrorCode = "ErrorNoNodesFound"
	ErrorUnrecognizedNodeProviderPrefix ErrorCode = "ErrorUnrecognizedNodeProviderPrefix"
	ErrorUnknownSecretType              ErrorCode = "ErrorUnknownSecretType"
	ErrorMalformedSecret                ErrorCode = "ErrorMalformedSecret"
	ErrorCreatingFile                   ErrorCode = "ErrorCreatingFile"
	ErrorWritingToFile                  ErrorCode = "ErrorWritingToFile"
	ErrorExportingWithOpenSSL           ErrorCode = "ErrorExportingWithOpenSSL"

	// brownfield package
	ErrorListenerLookup ErrorCode = "ErrorListenerLookup"

	// environment package
	ErrorMissingApplicationGatewayNameOrApplicationGatewayID ErrorCode = "ErrorMissingApplicationGatewayNameOrApplicationGatewayID"
	ErrorMissingApplicationGatewayName                       ErrorCode = "ErrorMissingApplicationGatewayName"
	ErrorNotAllowedApplicationGatewayID                      ErrorCode = "ErrorNotAllowedApplicationGatewayID"
	ErrorMissingSubnetInfo                                   ErrorCode = "ErrorMissingSubnetInfo"
	ErrorInvalidReconcilePeriod                              ErrorCode = "ErrorInvalidReconcilePeriod"

	// controller package
	ErrorFetchingAppGatewayConfig  ErrorCode = "ErrorFetchingAppGatewayConfig"
	ErrorDeployingAppGatewayConfig ErrorCode = "ErrorDeployingAppGatewayConfig"

	// annotations package
	ErrorMissingAnnotation ErrorCode = "ErrorMissingAnnotation"
	ErrorInvalidContent    ErrorCode = "ErrorInvalidContent"

	// azure package
	ErrorGetApplicationGatewayError             ErrorCode = "ErrorGetApplicationGatewayError"
	ErrorApplicationGatewayNotFound             ErrorCode = "ErrorApplicationGatewayNotFound"
	ErrorApplicationGatewayForbidden            ErrorCode = "ErrorApplicationGatewayForbidden"
	ErrorApplicationGatewayUnexpectedStatusCode ErrorCode = "ErrorApplicationGatewayUnexpectedStatusCode"
	ErrorSubnetNotFound                         ErrorCode = "ErrorSubnetNotFound"
	ErrorMissingResourceGroup                   ErrorCode = "ErrorMissingResourceGroup"

	// main package
	ErrorNoSuchNamespace ErrorCode = "ErrorNoSuchNamespace"
)

ErrorCodes for different errors in the controller

Jump to

Keyboard shortcuts

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