errors

package
v0.0.0-...-eec02a6 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	IsNegativeErrorMsg string = `must be greater than or equal to 0`
)

Variables

This section is empty.

Functions

func AlreadyExistsError

func AlreadyExistsError(message string, a ...any) error

func As

func As(err error, target any) bool

func AsInvalidJSONError

func AsInvalidJSONError(err error) (error, bool)

AsInvalidJSONError returns an InvalidJSONError, true if the error means the data cannot be unmarshaled, or the original error, false if it does not meet those conditions.

func AuthError

func AuthError(message string, a ...any) error

func AutogrowAlreadyAtMaxSizeError

func AutogrowAlreadyAtMaxSizeError(maxSize string) error

AutogrowAlreadyAtMaxSizeError creates an error when the volume is already at or above maxSize.

func AutogrowPolicyInUseError

func AutogrowPolicyInUseError(policyName string, volumeCount int, volumes []string) error

AutogrowPolicyInUseError creates an error when policy cannot be deleted because volumes are using it

func AutogrowPolicyNilError

func AutogrowPolicyNilError() error

AutogrowPolicyNilError creates an error when the autogrow policy is nil.

func AutogrowPolicyNotFoundError

func AutogrowPolicyNotFoundError(policyName string) error

AutogrowPolicyNotFoundError creates an error when a referenced Autogrow policy does not exist

func AutogrowPolicyNotUsableError

func AutogrowPolicyNotUsableError(policyName string, state string) error

AutogrowPolicyNotUsableError when policy exists but is in Failed/Deleting state

func AutogrowStuckResizeAtMaxSizeError

func AutogrowStuckResizeAtMaxSizeError(message string, a ...any) error

AutogrowStuckResizeAtMaxSizeError creates an error when the volume cannot be autogrown because growth after capping at maxSize is below the minimum required to trigger a resize for the backend.

func BootstrapError

func BootstrapError(err error) error

func BusClosedError

func BusClosedError() error

BusClosedError creates a new bus closed error.

func ConflictError

func ConflictError(message string, a ...any) error

ConflictError should be used when modifying a resource is disallowed due to interconnectedness or dependencies, such as when a snapshot is part of a group of snapshots.

func ConnectionError

func ConnectionError(message string, a ...any) error

func FCPSameLunNumberError

func FCPSameLunNumberError(message string, a ...any) error

func FormatError

func FormatError(err error) error

func FoundError

func FoundError(message string, a ...any) error

func HasResourceExhaustedError

func HasResourceExhaustedError(err error) (bool, *resourceExhaustedError)

func HasUnsupportedCapacityRangeError

func HasUnsupportedCapacityRangeError(err error) (bool, *unsupportedCapacityRangeError)

func ISCSIDeviceFlushError

func ISCSIDeviceFlushError(message string, a ...any) error

func ISCSISameLunNumberError

func ISCSISameLunNumberError(message string, a ...any) error

func InProgressError

func InProgressError(str string) error

func IncorrectLUKSPassphraseError

func IncorrectLUKSPassphraseError(message string, a ...any) error

func InterfaceNotSupportedError

func InterfaceNotSupportedError(requestedType, interfaceName string) error

InterfaceNotSupportedError creates a new error when a requested type doesn't support the requested interface.

func InvalidInputError

func InvalidInputError(message string, a ...any) error

func InvalidJSONError

func InvalidJSONError(message string, a ...any) error

func Is

func Is(err, target error) bool

func IsAlreadyExistsError

func IsAlreadyExistsError(err error) bool

func IsAuthError

func IsAuthError(err error) bool

func IsAutogrowAlreadyAtMaxSizeError

func IsAutogrowAlreadyAtMaxSizeError(err error) bool

func IsAutogrowPolicyInUseError

func IsAutogrowPolicyInUseError(err error) bool

func IsAutogrowPolicyNilError

func IsAutogrowPolicyNilError(err error) bool

func IsAutogrowPolicyNotFoundError

func IsAutogrowPolicyNotFoundError(err error) bool

func IsAutogrowPolicyNotUsableError

func IsAutogrowPolicyNotUsableError(err error) bool

func IsAutogrowStuckResizeAtMaxSizeError

func IsAutogrowStuckResizeAtMaxSizeError(err error) bool

func IsBootstrapError

func IsBootstrapError(err error) bool

func IsBusClosedError

func IsBusClosedError(err error) bool

IsBusClosedError returns true if the error is a bus closed error.

func IsConflictError

func IsConflictError(err error) bool

func IsConnectionError

func IsConnectionError(err error) bool

func IsFCPSameLunNumberError

func IsFCPSameLunNumberError(err error) bool

func IsFormatError

func IsFormatError(err error) bool

func IsFoundError

func IsFoundError(err error) bool

func IsISCSIDeviceFlushError

func IsISCSIDeviceFlushError(err error) bool

func IsISCSISameLunNumberError

func IsISCSISameLunNumberError(err error) bool

func IsInProgressError

func IsInProgressError(err error) bool

func IsIncorrectLUKSPassphraseError

func IsIncorrectLUKSPassphraseError(err error) bool

func IsInterfaceNotSupportedError

func IsInterfaceNotSupportedError(err error) bool

IsInterfaceNotSupportedError returns true if err is an interfaceNotSupportedError.

func IsInvalidInputError

func IsInvalidInputError(err error) bool

func IsInvalidJSONError

func IsInvalidJSONError(err error) bool

func IsKeyError

func IsKeyError(err error) bool

IsKeyError returns true if the error is a key error

func IsMaxLimitReachedError

func IsMaxLimitReachedError(err error) bool

func IsMaxWaitExceededError

func IsMaxWaitExceededError(err error) bool

func IsMismatchedStorageClassError

func IsMismatchedStorageClassError(err error) bool

func IsMustRetryError

func IsMustRetryError(err error) bool

func IsNilHandlerError

func IsNilHandlerError(err error) bool

IsNilHandlerError returns true if the error is a nil handler error.

func IsNodeNotSafeToPublishForBackendError

func IsNodeNotSafeToPublishForBackendError(err error) bool

func IsNotFoundError

func IsNotFoundError(err error) bool

func IsNotManagedError

func IsNotManagedError(err error) bool

func IsNotReadyError

func IsNotReadyError(err error) bool

func IsPreconditionError

func IsPreconditionError(err error) bool

func IsReconcileDeferredError

func IsReconcileDeferredError(err error) bool

func IsReconcileDeferredWithDuration

func IsReconcileDeferredWithDuration(err error) bool

func IsReconcileDeferredWithMaxDuration

func IsReconcileDeferredWithMaxDuration(err error) bool

func IsReconcileFailedError

func IsReconcileFailedError(err error) bool

func IsReconcileIncompleteError

func IsReconcileIncompleteError(err error) bool

func IsResourceNotFoundError

func IsResourceNotFoundError(err error) bool

func IsServerBackPressureError

func IsServerBackPressureError(err error) bool

func IsStateError

func IsStateError(err error) bool

IsStateError returns true if the error is a state error

func IsTempOperatorError

func IsTempOperatorError(err error) bool

func IsTerminalReconciliationError

func IsTerminalReconciliationError(err error) bool

func IsTimeoutError

func IsTimeoutError(err error) bool

func IsTooManyRequestsError

func IsTooManyRequestsError(err error) bool

func IsUnlicensedError

func IsUnlicensedError(err error) bool

func IsUnsupportedConfigError

func IsUnsupportedConfigError(err error) bool

func IsUnsupportedError

func IsUnsupportedError(err error) bool

func IsUsageStatsUnavailableError

func IsUsageStatsUnavailableError(err error) bool

func IsValueError

func IsValueError(err error) bool

IsValueError returns true if the error is a value error

func IsVolumeCreatingError

func IsVolumeCreatingError(err error) bool

func IsVolumeDeletingError

func IsVolumeDeletingError(err error) bool

func IsVolumeStateError

func IsVolumeStateError(err error) bool

func IsZeroValueError

func IsZeroValueError(err error) bool

IsZeroValueError returns true if the error is a zero value error.

func Join

func Join(errs ...error) error

func KeyNotFoundError

func KeyNotFoundError(key any) error

KeyNotFoundError creates an error when a key is not found

func MaxLimitReachedError

func MaxLimitReachedError(message string, a ...any) error

func MaxWaitExceededError

func MaxWaitExceededError(message string, a ...any) error

func MismatchedStorageClassError

func MismatchedStorageClassError(message string, a ...any) error

func MustRetryError

func MustRetryError(message string, a ...any) error

MustRetryError is a custom error type to indicate that an operation should be retried.

func New

func New(message string) error

func NewStateError

func NewStateError(state string, message string) error

NewStateError creates a new error with state and optional message

func NilHandlerError

func NilHandlerError() error

NilHandlerError creates a new nil handler error.

func NodeNotSafeToPublishForBackendError

func NodeNotSafeToPublishForBackendError(node, backendType string) error

func NotFoundError

func NotFoundError(message string, a ...any) error

func NotManagedError

func NotManagedError(message string, a ...any) error

func NotReadyError

func NotReadyError() error

func PreconditionError

func PreconditionError(message string, a ...any) error

func ReconcileDeferredError

func ReconcileDeferredError(message string, a ...any) error

func ReconcileDeferredWithDuration

func ReconcileDeferredWithDuration(duration time.Duration, message string, a ...any) error

ReconcileDeferredWithDuration returns an error that carries a duration for requeuing with AddAfter(duration).

func ReconcileDeferredWithDurationValue

func ReconcileDeferredWithDurationValue(err error) (time.Duration, bool)

ReconcileDeferredWithDurationValue returns the duration and true if err is a ReconcileDeferredWithDuration error; otherwise 0 and false.

func ReconcileDeferredWithMaxDuration

func ReconcileDeferredWithMaxDuration(maxDuration time.Duration, message string, a ...any) error

ReconcileDeferredWithMaxDuration returns an error that carries a maximum requeue duration. The controller should use rate-limited backoff but cap the next delay by this duration so the deadline is respected.

func ReconcileDeferredWithMaxDurationValue

func ReconcileDeferredWithMaxDurationValue(err error) (time.Duration, bool)

ReconcileDeferredWithMaxDurationValue returns the max duration and true if err is a ReconcileDeferredWithMaxDuration error; otherwise 0 and false.

func ReconcileFailedError

func ReconcileFailedError(message string, a ...any) error

func ReconcileIncompleteError

func ReconcileIncompleteError(message string, a ...any) error

func ResourceExhaustedError

func ResourceExhaustedError(err error) error

func ServerBackPressureError

func ServerBackPressureError(message string, a ...any) error

func TempOperatorError

func TempOperatorError(err error) error

func TerminalReconciliationError

func TerminalReconciliationError(message string) error

func TimeoutError

func TimeoutError(message string, a ...any) error

func TooManyRequestsError

func TooManyRequestsError(message string, a ...any) error

func TypeAssertionError

func TypeAssertionError(assertion string) error

func UnlicensedError

func UnlicensedError(message string, a ...any) error

func UnsupportedCapacityRangeError

func UnsupportedCapacityRangeError(err error) error

func UnsupportedConfigError

func UnsupportedConfigError(message string, a ...any) error

func UnsupportedError

func UnsupportedError(message string, a ...any) error

func Unwrap

func Unwrap(err error) error

func UsageStatsUnavailableError

func UsageStatsUnavailableError(message string, a ...any) error

func ValueNotFoundError

func ValueNotFoundError(value any, key ...any) error

ValueNotFoundError creates an error when a value is not found If key is provided, the error message includes the key context Usage: ValueNotFoundError(value) or ValueNotFoundError(value, key)

func VolumeCreatingError

func VolumeCreatingError(message string, a ...any) error

func VolumeDeletingError

func VolumeDeletingError(message string, a ...any) error

func VolumeStateError

func VolumeStateError(message string, a ...any) error

func WrapUnlicensedError

func WrapUnlicensedError(err error) error

func WrapUnsupportedConfigError

func WrapUnsupportedConfigError(err error) error

func WrapWithAlreadyExistsError

func WrapWithAlreadyExistsError(err error, message string, a ...any) error

func WrapWithConflictError

func WrapWithConflictError(err error, message string, a ...any) error

func WrapWithConnectionError

func WrapWithConnectionError(err error, message string, a ...any) error

func WrapWithFoundError

func WrapWithFoundError(err error, message string, a ...any) error

func WrapWithMustRetryError

func WrapWithMustRetryError(err error, message string, a ...any) error

func WrapWithNotFoundError

func WrapWithNotFoundError(err error, message string, a ...any) error

func WrapWithNotManagedError

func WrapWithNotManagedError(err error, message string, a ...any) error

func WrapWithReconcileDeferredError

func WrapWithReconcileDeferredError(err error, message string, a ...any) error

func WrapWithReconcileFailedError

func WrapWithReconcileFailedError(err error, message string, a ...any) error

func WrapWithReconcileIncompleteError

func WrapWithReconcileIncompleteError(err error, message string, a ...any) error

func WrapWithServerBackPressureError

func WrapWithServerBackPressureError(err error, message string, a ...any) error

func WrapWithTooManyRequestsError

func WrapWithTooManyRequestsError(err error, message string, a ...any) error

func ZeroValueError

func ZeroValueError(message string, a ...any) error

ZeroValueError creates a new error when a value is a zero value.

Types

type StateError

type StateError struct {
	State   string // The state (e.g., "Starting", "Stopping", "Running", "Stopped")
	Message string // Optional message
}

func (*StateError) Error

func (e *StateError) Error() string

Jump to

Keyboard shortcuts

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