scheduler

package
v0.0.0-...-7fe2d08 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2016 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const ResourceCheckingForJobTimeout = 5 * time.Minute

Variables

This section is empty.

Functions

This section is empty.

Types

type BuildScheduler

type BuildScheduler interface {
	Schedule(
		logger lager.Logger,
		versions *algorithm.VersionsDB,
		jobConfig atc.JobConfig,
		resourceConfigs atc.ResourceConfigs,
		resourceTypes atc.ResourceTypes,
	) error
	TriggerImmediately(
		logger lager.Logger,
		jobConfig atc.JobConfig,
		resourceConfigs atc.ResourceConfigs,
		resourceTypes atc.ResourceTypes,
	) (db.Build, Waiter, error)
	SaveNextInputMapping(logger lager.Logger, job atc.JobConfig) error
}

type Runner

type Runner struct {
	Logger lager.Logger

	DB db.PipelineDB

	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 {
	DB           SchedulerDB
	InputMapper  inputmapper.InputMapper
	BuildStarter 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,
	jobConfig atc.JobConfig,
	resourceConfigs atc.ResourceConfigs,
	resourceTypes atc.ResourceTypes,
) error

func (*Scheduler) TriggerImmediately

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

type SchedulerDB

type SchedulerDB interface {
	LeaseScheduling(lager.Logger, time.Duration) (db.Lease, bool, error)
	LoadVersionsDB() (*algorithm.VersionsDB, error)
	GetPipelineName() string
	GetConfig() (atc.Config, db.ConfigVersion, bool, error)
	CreateJobBuild(job string) (db.Build, error)
	EnsurePendingBuildExists(jobName string) error
	LeaseResourceCheckingForJob(logger lager.Logger, job string, interval time.Duration) (db.Lease, bool, error)
}

type Waiter

type Waiter interface {
	Wait()
}

Directories

Path Synopsis
buildstarterfakes
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
maxinflight/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
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
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