Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrNoRetryOption is returned by CanReschedule when a Function has no RetryOptions ErrNoRetryOption = errors.New("no retry option") // ErrRetryLimitExceded is returned by CanReschedule when a Function has already used all it retries ErrRetryLimitExceded = errors.New("retry limit exceded") )
Functions ¶
This section is empty.
Types ¶
type Function ¶
type Function struct { Name string `json:"name"` Args []interface{} `json:"args,omitempty"` //TODO: Delay time.Duration // To Delay a task RetryCount int32 `json:"retry_count"` RetryOptions *RetryOptions `json:"retry_options,omitempty"` }
Function represents a Job function
func (*Function) CanReschedule ¶
CanReschedule returns an error if this function cannot be rescheduled See returned error for exact reason
func (*Function) IncrRetryCount ¶
func (f *Function) IncrRetryCount()
type RetryOptions ¶
type RetryOptions struct {
RetryLimit int32 `json:"retry_limit"`
}
RetryOptions define retry policy for a given Function
Click to show internal directories.
Click to hide internal directories.