Documentation
¶
Index ¶
- Variables
- type Order
- type RetryTask
- func (t *RetryTask) Execute() (result interface{}, retry bool, fail error)
- func (t *RetryTask) GetExecution() (execute time.Time)
- func (t *RetryTask) GetID() (id string)
- func (t *RetryTask) GetRetryTime() time.Time
- func (t *RetryTask) GetTimeout() (executeTimeout time.Duration)
- func (t *RetryTask) IsValidID() bool
- func (t *RetryTask) SetExecution(current time.Time) time.Time
- func (t *RetryTask) SetID(id string)
- type Task
- func (t *Task) Execute() (result interface{}, retry bool, fail error)
- func (t *Task) GetExecution() (execute time.Time)
- func (t *Task) GetID() (id string)
- func (t *Task) GetRetryTime() time.Time
- func (t *Task) GetTimeout() (executeTimeout time.Duration)
- func (t *Task) IsValidID() bool
- func (t *Task) SetExecution(current time.Time) (old time.Time)
- func (t *Task) SetID(id string)
Constants ¶
This section is empty.
Variables ¶
View Source
var O = Order{}
O order
Functions ¶
This section is empty.
Types ¶
type Order ¶
type Order struct {
// contains filtered or unexported fields
}
Order is used for recording execution order
func (*Order) IsFirstZero ¶
IsFirstZero check if first is zero time
type RetryTask ¶
RetryTask implements task.Interface However it has no export field, which is not able to be scheduled by sched
func NewRetryTask ¶
NewRetryTask creates a task
func (*RetryTask) GetExecution ¶
GetExecution get execution time
func (*RetryTask) GetRetryTime ¶
GetRetryTime get retry execution duration
func (*RetryTask) GetTimeout ¶
GetTimeout get timeout of execution
func (*RetryTask) SetExecution ¶
SetExecution sets the execution time of a task
type Task ¶
type Task struct { Public string // contains filtered or unexported fields }
Task implements task.Interface
func (*Task) GetExecution ¶
GetExecution get execution time
func (*Task) GetRetryTime ¶
GetRetryTime get retry execution duration
func (*Task) GetTimeout ¶
GetTimeout get timeout of execution
func (*Task) SetExecution ¶
SetExecution sets the execution time of a task
Click to show internal directories.
Click to hide internal directories.