scheduler

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNoPendingTasks = errors.New("all tasks have been scheduled")

Functions

This section is empty.

Types

type Scheduler

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

A Scheduler determines which tasks are ready for execution based on task dependencies and target capacity.

func New

func New(targets types.Targets, tasks types.Tasks) (s *Scheduler, ready map[string][]string, err error)

New initializes a new Scheduler, and returns a set of tasks ready for immediate execution

func (*Scheduler) Next

func (s *Scheduler) Next(completed string) (ready map[string][]string, err error)

Next returns a set of tasks ready for execution given a completed task

Jump to

Keyboard shortcuts

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