Documentation ¶
Index ¶
- Constants
- Variables
- type BadObservationError
- type BadObservationErrorTemplData
- type FooBarError
- type FooBarErrorBehaviourQuery
- type FooBarTemplData
- type InvalidPoolExpiryError
- type InvalidPoolExpiryErrorTemplData
- type InvalidPreAllocSizeError
- type InvalidPreAllocSizeErrorTemplData
- type LackPoolFuncError
- type LackPoolFuncErrorTemplData
- type PoolClosedError
- type PoolClosedErrorTemplData
- type PoolOverloadError
- type PoolOverloadErrorTemplData
- type QueueIsFullError
- type QueueIsFullErrorTemplData
- type QueueIsReleasedError
- type QueueIsReleasedErrorTemplData
- type TimeoutError
- type TimeoutErrorTemplData
- type UsingConfigFileTemplData
Constants ¶
const (
// PantsSourceID source ID for the pants module
PantsSourceID = "github.com/snivilised/pants"
)
Variables ¶
var ErrBadObservation = BadObservationError{ LocalisableError: li18ngo.LocalisableError{ Data: BadObservationErrorTemplData{}, }, }
var ErrInvalidPoolExpiry = InvalidPoolExpiryError{ LocalisableError: li18ngo.LocalisableError{ Data: InvalidPoolExpiryErrorTemplData{}, }, }
var ErrInvalidPreAllocSize = InvalidPreAllocSizeError{ LocalisableError: li18ngo.LocalisableError{ Data: InvalidPreAllocSizeErrorTemplData{}, }, }
var ErrLackPoolFunc = LackPoolFuncError{ LocalisableError: li18ngo.LocalisableError{ Data: LackPoolFuncErrorTemplData{}, }, }
var ErrPoolClosed = PoolClosedError{ LocalisableError: li18ngo.LocalisableError{ Data: PoolClosedErrorTemplData{}, }, }
var ErrPoolOverload = PoolOverloadError{ LocalisableError: li18ngo.LocalisableError{ Data: PoolOverloadErrorTemplData{}, }, }
var ErrQueueIsFull = QueueIsFullError{ LocalisableError: li18ngo.LocalisableError{ Data: QueueIsFullErrorTemplData{}, }, }
var ErrQueueIsReleased = QueueIsReleasedError{ LocalisableError: li18ngo.LocalisableError{ Data: QueueIsReleasedErrorTemplData{}, }, }
var ErrTimeout = TimeoutError{ LocalisableError: li18ngo.LocalisableError{ Data: TimeoutErrorTemplData{}, }, }
Functions ¶
This section is empty.
Types ¶
type BadObservationError ¶ added in v0.1.4
type BadObservationError struct {
li18ngo.LocalisableError
}
type BadObservationErrorTemplData ¶ added in v0.1.4
type BadObservationErrorTemplData struct {
// contains filtered or unexported fields
}
BadObservationTemplData will be returned when trying to insert item to a released worker queue
func (BadObservationErrorTemplData) Message ¶ added in v0.1.4
func (td BadObservationErrorTemplData) Message() *i18n.Message
Message
type FooBarError ¶
type FooBarError struct {
li18ngo.LocalisableError
}
func NewFooBarError ¶
func NewFooBarError(path string, reason error) FooBarError
NewFooBarError creates a FooBarError
func (FooBarError) FooBar ¶
func (e FooBarError) FooBar() bool
FooBar enables the client to check if error is FooBarError via FooBarErrorBehaviourQuery
type FooBarErrorBehaviourQuery ¶
type FooBarErrorBehaviourQuery interface {
FooBar() bool
}
FooBarErrorBehaviourQuery used to query if an error is: "Failed to read directory contents from the path specified"
type FooBarTemplData ¶
FooBarTemplData - TODO: this is a none existent error that should be replaced by the client. Its just defined here to illustrate the pattern that should be used to implement i18n with extendio. Also note, that this message has been removed from the translation files, so it is not useable at run time.
func (FooBarTemplData) Message ¶
func (td FooBarTemplData) Message() *i18n.Message
the ID should use spp/library specific code, so replace astrolib with the name of the library implementing this template project.
type InvalidPoolExpiryError ¶
type InvalidPoolExpiryError struct {
li18ngo.LocalisableError
}
type InvalidPoolExpiryErrorTemplData ¶
type InvalidPoolExpiryErrorTemplData struct {
// contains filtered or unexported fields
}
InvalidPoolExpiryErrorTemplData will be returned when setting a negative number as the periodic duration to purge goroutines.
func (InvalidPoolExpiryErrorTemplData) Message ¶
func (td InvalidPoolExpiryErrorTemplData) Message() *i18n.Message
Message
type InvalidPreAllocSizeError ¶
type InvalidPreAllocSizeError struct {
li18ngo.LocalisableError
}
type InvalidPreAllocSizeErrorTemplData ¶
type InvalidPreAllocSizeErrorTemplData struct {
// contains filtered or unexported fields
}
InvalidPreAllocSizeErrorTemplData will be returned when trying to set up a negative capacity under PreAlloc mode.
func (InvalidPreAllocSizeErrorTemplData) Message ¶
func (td InvalidPreAllocSizeErrorTemplData) Message() *i18n.Message
Message
type LackPoolFuncError ¶
type LackPoolFuncError struct {
li18ngo.LocalisableError
}
type LackPoolFuncErrorTemplData ¶
type LackPoolFuncErrorTemplData struct {
// contains filtered or unexported fields
}
LackPoolFuncErrorTemplData will be returned when invokers don't provide function for pool.
func (LackPoolFuncErrorTemplData) Message ¶
func (td LackPoolFuncErrorTemplData) Message() *i18n.Message
Message
type PoolClosedError ¶
type PoolClosedError struct {
li18ngo.LocalisableError
}
type PoolClosedErrorTemplData ¶
type PoolClosedErrorTemplData struct {
// contains filtered or unexported fields
}
PoolClosedErrorTemplData will be returned when submitting task to a closed pool.
func (PoolClosedErrorTemplData) Message ¶
func (td PoolClosedErrorTemplData) Message() *i18n.Message
Message
type PoolOverloadError ¶
type PoolOverloadError struct {
li18ngo.LocalisableError
}
type PoolOverloadErrorTemplData ¶
type PoolOverloadErrorTemplData struct {
// contains filtered or unexported fields
}
PoolOverloadErrorTemplData will be returned when the pool is full and no workers available.
func (PoolOverloadErrorTemplData) Message ¶
func (td PoolOverloadErrorTemplData) Message() *i18n.Message
Message
type QueueIsFullError ¶
type QueueIsFullError struct {
li18ngo.LocalisableError
}
type QueueIsFullErrorTemplData ¶
type QueueIsFullErrorTemplData struct {
// contains filtered or unexported fields
}
QueueIsFullTemplData error created when the worker queue is full.
func (QueueIsFullErrorTemplData) Message ¶
func (td QueueIsFullErrorTemplData) Message() *i18n.Message
Message
type QueueIsReleasedError ¶
type QueueIsReleasedError struct {
li18ngo.LocalisableError
}
type QueueIsReleasedErrorTemplData ¶
type QueueIsReleasedErrorTemplData struct {
// contains filtered or unexported fields
}
QueueIsReleasedTemplData will be returned when trying to insert item to a released worker queue
func (QueueIsReleasedErrorTemplData) Message ¶
func (td QueueIsReleasedErrorTemplData) Message() *i18n.Message
Message
type TimeoutError ¶
type TimeoutError struct {
li18ngo.LocalisableError
}
type TimeoutErrorTemplData ¶
type TimeoutErrorTemplData struct {
// contains filtered or unexported fields
}
TimeoutErrorTemplData will be returned if an operation timed out.
func (TimeoutErrorTemplData) Message ¶
func (td TimeoutErrorTemplData) Message() *i18n.Message
Message
type UsingConfigFileTemplData ¶
type UsingConfigFileTemplData struct { ConfigFileName string // contains filtered or unexported fields }
func (UsingConfigFileTemplData) Message ¶
func (td UsingConfigFileTemplData) Message() *i18n.Message