Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Scheduler ¶
type Scheduler struct {
// contains filtered or unexported fields
}
Scheduler implements a basic dispatcher for tasks. Each task is simply a go routine that will do something in the background
func NewScheduler ¶
NewScheduler initialize a new scheduler.
func (*Scheduler) RegisterTask ¶
func (s *Scheduler) RegisterTask(task SchedulerTask) error
RegisterTask adds the task to the task queue of the scheduler. All tasks in this queue will be started later.
type SchedulerTask ¶
A SchedulerTask handles different tasks (jobs) in the background.
type TaskInstrumenting ¶
type TaskInstrumenting struct {
Next SchedulerTask
}
TaskInstrumenting implements a Prometheus instrumenting around regular SchedulerTask(s).
func (*TaskInstrumenting) Name ¶
func (ti *TaskInstrumenting) Name() string
Name returns the name of the underlaying task.
type TaskLogger ¶
type TaskLogger struct {
Next SchedulerTask
}
TaskLogger implements logging functions around regular SchedulerTask(s).
func (*TaskLogger) Name ¶
func (tl *TaskLogger) Name() string
Name returns the name of the underlaying task.
Click to show internal directories.
Click to hide internal directories.