core

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 6 Imported by: 0

README

Genruntime/Core

This package contains simple shared declarations used across the generic reconciler and generated code.

Documentation

Index

Constants

View Source
const (
	ErrorRetryable = ErrorClassification("retryable")
	ErrorFatal     = ErrorClassification("fatal")
)
View Source
const (
	UnknownErrorCode    = "UnknownError"
	UnknownErrorMessage = "There was an unknown deployment error"
)

Variables

This section is empty.

Functions

func AsTypedError

func AsTypedError[T error](err error) (T, bool)

func NewNotOwnedError

func NewNotOwnedError(namespace string, name string, gvk schema.GroupVersionKind, sourceName string, sourceGvk schema.GroupVersionKind) error

Types

type CloudErrorDetails

type CloudErrorDetails struct {
	Classification ErrorClassification
	Code           string
	Message        string
}

type ConfigMapNotFound

type ConfigMapNotFound struct {
	NamespacedName types.NamespacedName
	// contains filtered or unexported fields
}

ConfigMapNotFound error is used when configmap or its expected keys are not found

func NewConfigMapNotFoundError

func NewConfigMapNotFoundError(name types.NamespacedName, cause error) *ConfigMapNotFound

func (*ConfigMapNotFound) Cause

func (e *ConfigMapNotFound) Cause() error

func (*ConfigMapNotFound) Error

func (e *ConfigMapNotFound) Error() string

func (*ConfigMapNotFound) Format

func (e *ConfigMapNotFound) Format(s fmt.State, verb rune)

func (*ConfigMapNotFound) Is

func (e *ConfigMapNotFound) Is(err error) bool

type ErrorClassification

type ErrorClassification string

type NotOwnedError

type NotOwnedError struct {
	Namespace  string
	TargetName string
	TargetType string
	SourceName string
	SourceType string
}

NotOwnedError indicates the target resource is not owned by the resource attempting to write it

func AsNotOwnedError

func AsNotOwnedError(err error) (*NotOwnedError, bool)

func (*NotOwnedError) Error

func (e *NotOwnedError) Error() string

type ReferenceNotFound

type ReferenceNotFound struct {
	NamespacedName types.NamespacedName
	// contains filtered or unexported fields
}

func NewReferenceNotFoundError

func NewReferenceNotFoundError(name types.NamespacedName, cause error) *ReferenceNotFound

func (*ReferenceNotFound) Cause

func (e *ReferenceNotFound) Cause() error

func (*ReferenceNotFound) Error

func (e *ReferenceNotFound) Error() string

func (*ReferenceNotFound) Format

func (e *ReferenceNotFound) Format(s fmt.State, verb rune)

func (*ReferenceNotFound) Is

func (e *ReferenceNotFound) Is(err error) bool

type SecretNotFound

type SecretNotFound struct {
	NamespacedName types.NamespacedName
	// contains filtered or unexported fields
}

SecretNotFound error is used when secret or its expected keys are not found

func NewSecretNotFoundError

func NewSecretNotFoundError(name types.NamespacedName, cause error) *SecretNotFound

func (*SecretNotFound) Cause

func (e *SecretNotFound) Cause() error

func (*SecretNotFound) Error

func (e *SecretNotFound) Error() string

func (*SecretNotFound) Format

func (e *SecretNotFound) Format(s fmt.State, verb rune)

func (*SecretNotFound) Is

func (e *SecretNotFound) Is(err error) bool

type SubscriptionMismatch added in v2.3.0

type SubscriptionMismatch struct {
	ExpectedSubscription string
	ActualSubscription   string
	// contains filtered or unexported fields
}

SubscriptionMismatch error is used when a child resource and parent resource subscription don't match

func NewSubscriptionMismatchError added in v2.3.0

func NewSubscriptionMismatchError(expectedSub string, actualSub string) *SubscriptionMismatch

func (*SubscriptionMismatch) Cause added in v2.3.0

func (e *SubscriptionMismatch) Cause() error

func (*SubscriptionMismatch) Error added in v2.3.0

func (e *SubscriptionMismatch) Error() string

func (*SubscriptionMismatch) Format added in v2.3.0

func (e *SubscriptionMismatch) Format(s fmt.State, verb rune)

func (*SubscriptionMismatch) Is added in v2.3.0

func (e *SubscriptionMismatch) Is(err error) bool

Jump to

Keyboard shortcuts

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