Documentation
¶
Index ¶
- type BaseTask
- type Event
- type EventManager
- type ListenHook
- type Task
- type TaskGroup
- type TaskScheduler
- func (ts *TaskScheduler) CloseAll()
- func (ts *TaskScheduler) Execute(task Task, signal chan struct{}, async bool)
- func (ts *TaskScheduler) ExecuteBatch(tasks []Task, signal chan struct{})
- func (ts *TaskScheduler) ExecuteTaskGroup(tg *TaskGroup, signal chan struct{})
- func (ts *TaskScheduler) IsRunning(key string) bool
- func (ts *TaskScheduler) Wait()
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BaseTask ¶
type BaseTask struct {
// contains filtered or unexported fields
}
func (*BaseTask) BeforeExecute ¶
type EventManager ¶
type EventManager struct {
// contains filtered or unexported fields
}
func (*EventManager) Dispatch ¶
func (em *EventManager) Dispatch()
func (*EventManager) Register ¶
func (em *EventManager) Register(event func())
type ListenHook ¶
type ListenHook func(signal chan struct{}, onClose func())
type TaskGroup ¶
type TaskGroup struct {
// contains filtered or unexported fields
}
func NewTaskGroup ¶
type TaskScheduler ¶
type TaskScheduler struct {
// contains filtered or unexported fields
}
func NewTaskScheduler ¶
func NewTaskScheduler(listen ListenHook, limiter limiter.Fixed) *TaskScheduler
func (*TaskScheduler) CloseAll ¶
func (ts *TaskScheduler) CloseAll()
func (*TaskScheduler) Execute ¶ added in v1.4.0
func (ts *TaskScheduler) Execute(task Task, signal chan struct{}, async bool)
func (*TaskScheduler) ExecuteBatch ¶
func (ts *TaskScheduler) ExecuteBatch(tasks []Task, signal chan struct{})
func (*TaskScheduler) ExecuteTaskGroup ¶
func (ts *TaskScheduler) ExecuteTaskGroup(tg *TaskGroup, signal chan struct{})
func (*TaskScheduler) IsRunning ¶
func (ts *TaskScheduler) IsRunning(key string) bool
func (*TaskScheduler) Wait ¶
func (ts *TaskScheduler) Wait()
Click to show internal directories.
Click to hide internal directories.