Documentation ¶
Overview ¶
Package errdefs provides common error definitions for gpud.
Index ¶
- Variables
- func IsAlreadyExists(err error) bool
- func IsCanceled(err error) bool
- func IsDeadlineExceeded(err error) bool
- func IsFailedPrecondition(err error) bool
- func IsInvalidArgument(err error) bool
- func IsNotFound(err error) bool
- func IsNotImplemented(err error) bool
- func IsUnavailable(err error) bool
Constants ¶
This section is empty.
Variables ¶
var ( ErrUnknown = errors.New("unknown") // used internally to represent a missed mapping. ErrInvalidArgument = errors.New("invalid argument") ErrNotFound = errors.New("not found") ErrAlreadyExists = errors.New("already exists") ErrFailedPrecondition = errors.New("failed precondition") ErrNotImplemented = errors.New("not implemented") // represents not supported and unimplemented )
Definitions of common error types used. All 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.
For the most part, we just try to provide local grpc errors. Most conditions map very well to those defined by grpc.
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 IsDeadlineExceeded ¶
IsDeadlineExceeded returns true if the error is due to `context.DeadlineExceeded`.
func IsFailedPrecondition ¶
IsFailedPrecondition returns true if an operation could not proceed to the lack of a particular condition
func IsInvalidArgument ¶
IsInvalidArgument returns true if the error is due to an invalid argument
func IsNotFound ¶
IsNotFound returns true if the error is due to a missing object
func IsNotImplemented ¶
IsNotImplemented returns true if the error is due to not being implemented
func IsUnavailable ¶
IsUnavailable returns true if the error is due to a resource being unavailable
Types ¶
This section is empty.