errs

package
v0.0.0-...-977965f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 28, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package errs define some system errors with specified types.

Index

Constants

View Source
const (
	// JobStoppedErrorCode is code for jobStoppedError
	JobStoppedErrorCode = 10000 + iota
	// JobCancelledErrorCode is code for jobCancelledError
	JobCancelledErrorCode
	// ReadRequestBodyErrorCode is code for the error of reading http request body error
	ReadRequestBodyErrorCode
	// HandleJSONDataErrorCode is code for the error of handling json data error
	HandleJSONDataErrorCode
	// MissingBackendHandlerErrorCode is code for the error of missing backend controller
	MissingBackendHandlerErrorCode
	// LaunchJobErrorCode is code for the error of launching job
	LaunchJobErrorCode
	// CheckStatsErrorCode is code for the error of checking stats of worker pool
	CheckStatsErrorCode
	// GetJobStatsErrorCode is code for the error of getting stats of enqueued job
	GetJobStatsErrorCode
	// StopJobErrorCode is code for the error of stopping job
	StopJobErrorCode
	// CancelJobErrorCode is code for the error of cancelling job
	CancelJobErrorCode
	// RetryJobErrorCode is code for the error of retrying job
	RetryJobErrorCode
	// UnknownActionNameErrorCode is code for the case of unknown action name
	UnknownActionNameErrorCode
	// GetJobLogErrorCode is code for the error of getting job log
	GetJobLogErrorCode
	// NoObjectFoundErrorCode is code for the error of no object found
	NoObjectFoundErrorCode
	// UnAuthorizedErrorCode is code for the error of unauthorized accessing
	UnAuthorizedErrorCode
	// ResourceConflictsErrorCode is code for the error of resource conflicting
	ResourceConflictsErrorCode
)

Variables

This section is empty.

Functions

func CancelJobError

func CancelJobError(err error) error

CancelJobError is error for the case of cancelling job failed

func CheckStatsError

func CheckStatsError(err error) error

CheckStatsError is error wrapper for the error of checking stats failed

func ConflictError

func ConflictError(object string) error

ConflictError is error for the case of resource conflicting

func GetJobLogError

func GetJobLogError(err error) error

GetJobLogError is error for the case of getting job log failed

func GetJobStatsError

func GetJobStatsError(err error) error

GetJobStatsError is error wrapper for the error of getting job stats

func HandleJSONDataError

func HandleJSONDataError(err error) error

HandleJSONDataError is error wrapper for the error of handling json data.

func IsConflictError

func IsConflictError(err error) bool

IsConflictError returns true if the error is conflictError

func IsJobCancelledError

func IsJobCancelledError(err error) bool

IsJobCancelledError return true if the error is jobCancelledError

func IsJobStoppedError

func IsJobStoppedError(err error) bool

IsJobStoppedError return true if the error is jobStoppedError

func IsObjectNotFoundError

func IsObjectNotFoundError(err error) bool

IsObjectNotFoundError return true if the error is objectNotFoundError

func JobCancelledError

func JobCancelledError() error

JobCancelledError is error wrapper for the case of cancelling job.

func JobStoppedError

func JobStoppedError() error

JobStoppedError is error wrapper for the case of stopping job.

func LaunchJobError

func LaunchJobError(err error) error

LaunchJobError is error wrapper for the error of launching job failed.

func MissingBackendHandlerError

func MissingBackendHandlerError(err error) error

MissingBackendHandlerError is error wrapper for the error of missing backend controller.

func New

func New(code uint16, err string, description string) error

New customized errors

func NoObjectFoundError

func NoObjectFoundError(object string) error

NoObjectFoundError is error wrapper for the case of no object found

func ReadRequestBodyError

func ReadRequestBodyError(err error) error

ReadRequestBodyError is error wrapper for the error of reading request body.

func RetryJobError

func RetryJobError(err error) error

RetryJobError is error for the case of retrying job failed

func StopJobError

func StopJobError(err error) error

StopJobError is error for the case of stopping job failed

func UnauthorizedError

func UnauthorizedError(err error) error

UnauthorizedError is error for the case of unauthorized accessing

func UnknownActionNameError

func UnknownActionNameError(err error) error

UnknownActionNameError is error for the case of getting unknown job action

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL