Documentation
¶
Overview ¶
Package errors provides typed reconcile error classes (ADR-0602).
Index ¶
- Constants
- Variables
- func ClassOf(err error) string
- func ClassifyAPI(err error) error
- func Forbidden(err error) error
- func Format(class error, format string, args ...any) error
- func IsForbidden(err error) bool
- func IsTerminal(err error) bool
- func IsTransient(err error) bool
- func Terminal(err error) error
- func Transient(err error) error
- type ClassError
Constants ¶
View Source
const ( ClassTransient = "transient" ClassTerminal = "terminal" ClassForbidden = "forbidden" )
Reconcile error classes — align with metrics label values in internal/metrics.
Variables ¶
View Source
var ( ErrTransient = errors.New("transient") ErrTerminal = errors.New("terminal") ErrForbidden = errors.New("forbidden") )
Sentinel values for errors.Is classification.
Functions ¶
func ClassifyAPI ¶
ClassifyAPI maps common Kubernetes API errors to typed classes.
func IsForbidden ¶
IsForbidden reports whether err is an RBAC/SAR denial.
func IsTerminal ¶
IsTerminal reports whether err should stop requeue until spec changes.
func IsTransient ¶
IsTransient reports whether err should be retried with backoff.
Types ¶
type ClassError ¶
ClassError wraps an underlying error with a reconcile class.
func (*ClassError) Error ¶
func (e *ClassError) Error() string
func (*ClassError) Is ¶
func (e *ClassError) Is(target error) bool
func (*ClassError) Unwrap ¶
func (e *ClassError) Unwrap() error
Click to show internal directories.
Click to hide internal directories.