scheduler

package
v6.7.3-0...-1f455d7 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Algorithm

type Algorithm interface {
	Compute(
		context.Context,
		db.Job,
		db.InputConfigs,
	) (db.InputMapping, bool, bool, error)
}

type Build

type Build interface {
	db.Build

	IsReadyToDetermineInputs(lager.Logger) (bool, error)
	BuildInputs(context.Context) ([]db.BuildInput, bool, error)
}

type BuildPlanner

type BuildPlanner interface {
	Create(atc.StepConfig, db.SchedulerResources, atc.VersionedResourceTypes, []db.BuildInput) (atc.Plan, error)
}

type BuildScheduler

type BuildScheduler interface {
	Schedule(
		ctx context.Context,
		logger lager.Logger,
		job db.SchedulerJob,
	) (bool, error)
}

type BuildStarter

type BuildStarter interface {
	TryStartPendingBuildsForJob(
		logger lager.Logger,
		job db.SchedulerJob,
		inputs db.InputConfigs,
	) (bool, error)
}

func NewBuildStarter

func NewBuildStarter(
	planner BuildPlanner,
	algorithm Algorithm,
) BuildStarter

type Runner

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

func NewRunner

func NewRunner(logger lager.Logger, jobFactory db.JobFactory, scheduler BuildScheduler, maxJobs uint64) *Runner

func (*Runner) Run

func (s *Runner) Run(ctx context.Context) error

type Scheduler

type Scheduler struct {
	Algorithm    Algorithm
	BuildStarter BuildStarter
}

func (*Scheduler) Schedule

func (s *Scheduler) Schedule(
	ctx context.Context,
	logger lager.Logger,
	job db.SchedulerJob,
) (bool, error)

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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