scheduler

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2024 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	Next      time.Time
	Job       Job
	EntryType Type
	Logger    logger.Logger
}

func (*Entry) Invoke

func (e *Entry) Invoke() error

type EntryReader

type EntryReader interface {
	Read(now time.Time) ([]*Entry, error)
}

type Job

type Job interface {
	GetDAG() *dag.DAG
	Start() error
	Stop() error
	Restart() error
	String() string
}

type Params

type Params struct {
	EntryReader EntryReader
	Logger      logger.Logger
	LogDir      string
}

type Scheduler

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

func New

func New(params Params) *Scheduler

func (*Scheduler) Start

func (s *Scheduler) Start() error

func (*Scheduler) Stop

func (s *Scheduler) Stop()

type Type

type Type int
const (
	Start Type = iota
	Stop
	Restart
)

Jump to

Keyboard shortcuts

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