Documentation
¶
Index ¶
Constants ¶
View Source
const ( // WAITING the job is waiting WAITING = iota + 1 // RUNNING the job is running RUNNING // SUCCESS the job is success SUCCESS // FAILURE the job is failure FAILURE )
Variables ¶
View Source
var Tasks = map[string]*Task{}
Tasks the registered tasks
Functions ¶
Types ¶
type Handlers ¶
type Handlers struct {
Exec func(int, ...interface{}) (interface{}, error)
Progress func(int, int, int, string)
NextID func() (int, error)
Add func(int)
Success func(int, interface{})
Error func(int, error)
}
Handlers the event handlers
type Option ¶
type Option struct {
Name string
JobQueueLength int
WorkerNums int
AttemptAfter int
Attempts int
Timeout int
}
Option the task option
Click to show internal directories.
Click to hide internal directories.