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 ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknown = errdefs.ErrUnknown ErrInvalidArgument = errdefs.ErrInvalidArgument ErrNotFound = errdefs.ErrNotFound ErrAlreadyExists = errdefs.ErrAlreadyExists ErrPermissionDenied = errdefs.ErrPermissionDenied ErrResourceExhausted = errdefs.ErrResourceExhausted ErrFailedPrecondition = errdefs.ErrFailedPrecondition ErrConflict = errdefs.ErrConflict ErrNotModified = errdefs.ErrNotModified ErrAborted = errdefs.ErrAborted ErrOutOfRange = errdefs.ErrOutOfRange ErrNotImplemented = errdefs.ErrNotImplemented ErrInternal = errdefs.ErrInternal ErrDataLoss = errdefs.ErrDataLoss ErrUnauthenticated = errdefs.ErrUnauthenticated IsCanceled = errdefs.IsCanceled IsUnknown = errdefs.IsUnknown IsInvalidArgument = errdefs.IsInvalidArgument IsDeadlineExceeded = errdefs.IsDeadlineExceeded IsNotFound = errdefs.IsNotFound IsAlreadyExists = errdefs.IsAlreadyExists IsPermissionDenied = errdefs.IsPermissionDenied IsResourceExhausted = errdefs.IsResourceExhausted IsFailedPrecondition = errdefs.IsFailedPrecondition IsConflict = errdefs.IsConflict IsNotModified = errdefs.IsNotModified IsAborted = errdefs.IsAborted IsOutOfRange = errdefs.IsOutOfRange IsNotImplemented = errdefs.IsNotImplemented IsInternal = errdefs.IsInternal IsDataLoss = errdefs.IsDataLoss )
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 FromGRPC ¶
FromGRPC returns the underlying error from a grpc service based on the grpc error code
func ToGRPC ¶
ToGRPC will attempt to map the backend containerd error into a grpc error, using the original error message as a description.
Further information may be extracted from certain errors depending on their type.
If the error is unmapped, the original error will be returned to be handled by the regular grpc error handling stack.
Types ¶
This section is empty.