package errors
Import Path
github.com/hibiken/asynq/internal/errors (on go.dev)
Dependency Relation
imports 5 packages, and imported by 3 packages
Involved Source Files
Package errors defines the error type and functions used by
asynq and its internal packages.
Package-Level Type Names (total 8)
Code defines the canonical error code.
( Code) String() string
Code : expvar.Var
Code : fmt.Stringer
func CanonicalCode(err error) Code
const AlreadyExists
const FailedPrecondition
const Internal
const NotFound
const Unknown
const Unspecified
Error is the type that implements the error interface.
It contains a number of fields, each of different type.
An Error value may leave some values unset.
Code Code
Err error
Op Op
(*Error) DebugString() string
(*Error) Error() string
(*Error) Unwrap() error
*Error : error
*Error : golang.org/x/xerrors.Wrapper
Op describes an operation, usually as the package and method,
such as "rdb.Enqueue".
QueueNotEmptyError indicates that the given queue is not empty.
// queue name
(*QueueNotEmptyError) Error() string
*QueueNotEmptyError : error
QueueNotFoundError indicates that a queue with the given name does not exist.
// queue name
(*QueueNotFoundError) Error() string
*QueueNotFoundError : error
RedisCommandError indicates that the given redis command returned error.
// redis command (e.g. LRANGE, ZADD, etc)
// underlying error
(*RedisCommandError) Error() string
(*RedisCommandError) Unwrap() error
*RedisCommandError : error
*RedisCommandError : golang.org/x/xerrors.Wrapper
Package-Level Functions (total 11)
As finds the first error in err's chain that matches target, and if so, sets target to that error value and returns true.
Otherwise, it returns false.
This function is the errors.As function from the standard library (https://golang.org/pkg/errors/#As).
It is exported from this package for import convenience.
CanonicalCode returns the canonical code of the given error if one is present.
Otherwise it returns Unspecified.
E builds an error value from its arguments.
There must be at least one argument or E panics.
The type of each argument determines its meaning.
If more than one argument of a given type is presented,
only the last one is recorded.
The types are:
errors.Op
The operation being performed, usually the method
being invoked (Get, Put, etc.).
errors.Code
The canonical error code, such as NOT_FOUND.
string
Treated as an error message and assigned to the
Err field after a call to errors.New.
error
The underlying error that triggered this one.
If the error is printed, only those items that have been
set to non-zero values will appear in the result.
Is reports whether any error in err's chain matches target.
This function is the errors.Is function from the standard library (https://golang.org/pkg/errors/#Is).
It is exported from this package for import convenience.
IsQueueNotEmpty reports whether any error in err's chain is of type QueueNotEmptyError.
IsQueueNotFound reports whether any error in err's chain is of type QueueNotFoundError.
IsRedisCommandError reports whether any error in err's chain is of type RedisCommandError.
IsTaskAlreadyArchived reports whether any error in err's chain is of type TaskAlreadyArchivedError.
IsTaskNotFound reports whether any error in err's chain is of type TaskNotFoundError.
New returns an error that formats as the given text.
Each call to New returns a distinct error value even if the text is identical.
This function is the errors.New function from the standard library (https://golang.org/pkg/errors/#New).
It is exported from this package for import convenience.
Unwrap returns the result of calling the Unwrap method on err, if err's type contains an Unwrap method returning error.
Otherwise, Unwrap returns nil.
This function is the errors.Unwrap function from the standard library (https://golang.org/pkg/errors/#Unwrap).
It is exported from this package for import convenience.
Package-Level Variables (total 3)
ErrDuplicateTask indicates that another task with the same unique key holds the uniqueness lock.
ErrNoProcessableTask indicates that there are no tasks ready to be processed.
ErrTaskIdConflict indicates that another task with the same task ID already exist
Package-Level Constants (total 6)
List of canonical error codes.
List of canonical error codes.
List of canonical error codes.
List of canonical error codes.
List of canonical error codes.
List of canonical error codes.
![]() |
The pages are generated with Golds v0.8.2. (GOOS=linux GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @zigo_101 (reachable from the left QR code) to get the latest news of Golds. |