Documentation
¶
Overview ¶
Package errdefs defines the common errors used throughout containerd packages.
Use with fmt.Errorf to add context to an error.
To detect an error class, use the IsXXX functions to tell whether an error is of a certain type.
Index ¶
- Variables
- func IsAborted(err error) bool
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsConflict(err error) bool
- func IsDataLoss(err error) bool
- func IsDeadlineExceeded(err error) bool
- func IsFailedPrecondition(err error) bool
- func IsInternal(err error) bool
- func IsInvalidArgument(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplemented(err error) bool
- func IsNotModified(err error) bool
- func IsOutOfRange(err error) bool
- func IsPermissionDenied(err error) bool
- func IsResourceExhausted(err error) bool
- func IsUnauthorized(err error) bool
- func IsUnavailable(err error) bool
- func IsUnknown(err error) bool
- func Resolve(err error) error
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknown = errUnknown{} ErrInvalidArgument = errInvalidArgument{} ErrNotFound = errNotFound{} ErrAlreadyExists = errAlreadyExists{} ErrPermissionDenied = errPermissionDenied{} ErrResourceExhausted = errResourceExhausted{} ErrFailedPrecondition = errFailedPrecondition{} ErrConflict = errConflict{} ErrNotModified = errNotModified{} ErrAborted = errAborted{} ErrOutOfRange = errOutOfRange{} ErrNotImplemented = errNotImplemented{} ErrInternal = errInternal{} ErrDataLoss = errDataLoss{} ErrUnauthenticated = errUnauthorized{} )
Definitions of common error types used throughout containerd. All containerd errors returned by most packages will map into one of these errors classes. Packages should return errors of these types when they want to instruct a client to take a particular action.
These errors map closely to grpc errors.
Functions ¶
func IsAlreadyExists ¶
IsAlreadyExists returns true if the error is due to an already existing metadata item
func IsCanceled ¶
IsCanceled returns true if the error is due to `context.Canceled`.
func IsConflict ¶ added in v0.2.0
IsConflict returns true if an operation could not proceed due to a conflict.
func IsDataLoss ¶ added in v0.2.0
IsDataLoss returns true if data during an operation was lost or corrupted
func IsDeadlineExceeded ¶
IsDeadlineExceeded returns true if the error is due to `context.DeadlineExceeded`.
func IsFailedPrecondition ¶
func IsFailedPrecondition(err error)