sched

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Options

type Options struct {
	BuildID    string
	Name       string
	Runner     project.Runner
	Executor   project.Executor
	Rules      []*project.Rule
	RunRemote  bool
	NumWorkers int
}

Options used to configure the Scheduler

type Scheduler

type Scheduler interface {

	// Run specified Rules
	Run(context.Context, Options) error
}

Scheduler for jobs

func NewGraphScheduler

func NewGraphScheduler() Scheduler

NewGraphScheduler returns a default scheduler

type Status

type Status int

Status indicates the running state of a rule in the scheduler

const (

	// Unscheduled says that Rule has not had a chance to run yet
	Unscheduled Status = iota

	// Aborted indicates the Rule was not run due to failed dependencies
	Aborted

	// Running indicates the Rule is currently running
	Running

	// Error indicates that Rule execution was attempted but had an error
	Error

	// Completed indicates the Rule ran successfully
	Completed
)

Jump to

Keyboard shortcuts

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