scheduler

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2020 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrTaskScheduled = errors.New("ErrTaskScheduled: task already scheduled")

Functions

This section is empty.

Types

type Scheduler

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

func New

func New(concurrencyCeiling int) (*Scheduler, error)

func (*Scheduler) Run

func (s *Scheduler) Run(c context.Context)

func (*Scheduler) Schedule

func (s *Scheduler) Schedule(task Task) error

type Task

type Task interface {
	ID() string
	Work() func() error
}

Jump to

Keyboard shortcuts

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