scheduler

package
v0.0.0-...-5a2029e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 25, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

func NewManager

func NewManager(ctx context.Context, dao dao.Storage) (*Manager, error)

NewManager create schedule manager

func (*Manager) InitSchedulers

func (m *Manager) InitSchedulers(schedules ...Scheduler) error

func (*Manager) Schedule

func (m *Manager) Schedule() error

func (*Manager) Stop

func (m *Manager) Stop()

type Scheduler

type Scheduler interface {
	GetName() string
	Init(taskTypes.InitConfigs) error
	Schedule(ctx context.Context, task *taskTypes.Task) error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL