scheduler

package
v0.0.0-...-e99be67 Latest Latest
Warning

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

Go to latest
Published: May 4, 2017 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildFactory

type BuildFactory interface {
	Create(atc.JobConfig, atc.ResourceConfigs, atc.VersionedResourceTypes, []dbng.BuildInput) (atc.Plan, error)
}

type BuildScheduler

type BuildScheduler interface {
	Schedule(
		logger lager.Logger,
		versions *algorithm.VersionsDB,
		jobConfigs atc.JobConfigs,
		resourceConfigs atc.ResourceConfigs,
		resourceTypes atc.VersionedResourceTypes,
	) (map[string]time.Duration, error)

	TriggerImmediately(
		logger lager.Logger,
		jobConfig atc.JobConfig,
		resourceConfigs atc.ResourceConfigs,
		resourceTypes atc.VersionedResourceTypes,
	) (dbng.Build, Waiter, error)

	SaveNextInputMapping(logger lager.Logger, job atc.JobConfig) error
}

type BuildStarter

type BuildStarter interface {
	TryStartPendingBuildsForJob(
		logger lager.Logger,
		jobConfig atc.JobConfig,
		resourceConfigs atc.ResourceConfigs,
		resourceTypes atc.VersionedResourceTypes,
		nextPendingBuilds []dbng.Build,
	) error
}

func NewBuildStarter

func NewBuildStarter(
	pipeline dbng.Pipeline,
	maxInFlightUpdater maxinflight.Updater,
	factory BuildFactory,
	scanner Scanner,
	inputMapper inputmapper.InputMapper,
	execEngine engine.Engine,
) BuildStarter

type Runner

type Runner struct {
	Logger lager.Logger

	DB db.PipelineDB

	Pipeline dbng.Pipeline

	Scheduler BuildScheduler

	Noop bool

	Interval time.Duration
}

func (*Runner) Run

func (runner *Runner) Run(signals <-chan os.Signal, ready chan<- struct{}) error

type Scanner

type Scanner interface {
	Scan(lager.Logger, string) error
}

type Scheduler

type Scheduler struct {
	Pipeline     dbng.Pipeline
	InputMapper  inputmapper.InputMapper
	BuildStarter BuildStarter
	Scanner      Scanner
}

func (*Scheduler) SaveNextInputMapping

func (s *Scheduler) SaveNextInputMapping(logger lager.Logger, job atc.JobConfig) error

func (*Scheduler) Schedule

func (s *Scheduler) Schedule(
	logger lager.Logger,
	versions *algorithm.VersionsDB,
	jobConfigs atc.JobConfigs,
	resourceConfigs atc.ResourceConfigs,
	resourceTypes atc.VersionedResourceTypes,
) (map[string]time.Duration, error)

func (*Scheduler) TriggerImmediately

func (s *Scheduler) TriggerImmediately(
	logger lager.Logger,
	jobConfig atc.JobConfig,
	resourceConfigs atc.ResourceConfigs,
	resourceTypes atc.VersionedResourceTypes,
) (dbng.Build, Waiter, error)

type Waiter

type Waiter interface {
	Wait()
}

Directories

Path Synopsis
factoryfakes
This file was generated by counterfeiter
This file was generated by counterfeiter
inputconfig/inputconfigfakes
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter
inputmapperfakes
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter
maxinflightfakes
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter
This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter This file was generated by counterfeiter

Jump to

Keyboard shortcuts

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