Documentation ¶
Index ¶
- Variables
- type Duty
- func (m Duty) Close()
- func (m Duty) Enqueue(t task.Task) (task.ScheduledTask, error)
- func (m Duty) EnqueueWithID(id string, t task.Task) (task.ScheduledTask, error)
- func (m Duty) Execute(t task.Task) (pool.ScheduledTaskResult, error)
- func (m Duty) Get(id string) (task.ScheduledTask, error)
- func (m Duty) Init() error
- func (m Duty) Tasks(id string) ([]task.ScheduledTask, error)
- type Options
- type StateKeeper
Constants ¶
This section is empty.
Variables ¶
View Source
var AssignID = ""
View Source
var Default = Options{}
Functions ¶
This section is empty.
Types ¶
type Duty ¶
type Duty struct { Storage storage.Storage WorkPool pool.Pool StateKeeper StateKeeper ResultCallback func(pool.ScheduledTaskResult) }
func (Duty) EnqueueWithID ¶
type Options ¶
type Options struct { ResultCallback func(pool.ScheduledTaskResult) Workers int QueueSize int }
type StateKeeper ¶
type StateKeeper struct {
// contains filtered or unexported fields
}
func NewStateKeeper ¶
func NewStateKeeper() StateKeeper
func (*StateKeeper) AddRunningTask ¶
func (sk *StateKeeper) AddRunningTask(task task.ScheduledTask)
func (*StateKeeper) IsRunning ¶
func (sk *StateKeeper) IsRunning(id string) bool
func (*StateKeeper) RemoveRunningTask ¶
func (sk *StateKeeper) RemoveRunningTask(task task.ScheduledTask)
func (*StateKeeper) RunningTasks ¶
func (sk *StateKeeper) RunningTasks() []task.ScheduledTask
Click to show internal directories.
Click to hide internal directories.