scheduler

package
v0.0.0-...-50e0b1d Latest Latest
Warning

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

Go to latest
Published: Dec 20, 2018 License: Apache-2.0 Imports: 8 Imported by: 0

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 type

func New

func New(maxTasks int, grace time.Duration, wchan chan []byte) (sched *Scheduler)

New returns a initialized scheduler

func (*Scheduler) AddJob

func (s *Scheduler) AddJob(spec string, coll *tact.Collector, node *tact.Node, ttl time.Duration) (err error)

AddJob function

func (*Scheduler) Cancel

func (s *Scheduler) Cancel()

Cancel the scheduler and runnning jobs

func (*Scheduler) Start

func (s *Scheduler) Start()

Start the scheduler

func (*Scheduler) Stop

func (s *Scheduler) Stop()

Stop the scheduler and wait for runnning jobs to finish

Jump to

Keyboard shortcuts

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