engine

package
v0.75.0-no-limit Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2016 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBuildNotActive = errors.New("build not yet active")

Functions

This section is empty.

Types

type Build

type Build interface {
	Metadata() string

	PublicPlan(lager.Logger) (atc.PublicBuildPlan, bool, error)

	Abort(lager.Logger) error
	Resume(lager.Logger)
}

type BuildDB

type BuildDB interface {
	GetBuild(int) (db.Build, bool, error)
	StartBuild(int, string, string) (bool, error)

	AbortBuild(int) error
	AbortNotifier(int) (db.Notifier, error)

	LeaseBuildTracking(buildID int, interval time.Duration) (db.Lease, bool, error)

	FinishBuild(int, db.Status) error
}

type BuildDelegate

type BuildDelegate interface {
	InputDelegate(lager.Logger, atc.GetPlan, event.OriginID) exec.GetDelegate
	ExecutionDelegate(lager.Logger, atc.TaskPlan, event.OriginID) exec.TaskDelegate
	OutputDelegate(lager.Logger, atc.PutPlan, event.OriginID) exec.PutDelegate

	Finish(lager.Logger, error, exec.Success, bool)
}

type BuildDelegateFactory

type BuildDelegateFactory interface {
	Delegate(buildID int) BuildDelegate
}

func NewBuildDelegateFactory

func NewBuildDelegateFactory(db EngineDB) BuildDelegateFactory

type Engine

type Engine interface {
	Name() string

	CreateBuild(lager.Logger, db.Build, atc.Plan) (Build, error)
	LookupBuild(lager.Logger, db.Build) (Build, error)
}

func NewDBEngine

func NewDBEngine(engines Engines, buildDB BuildDB) Engine

func NewExecEngine

func NewExecEngine(factory exec.Factory, delegateFactory BuildDelegateFactory, db EngineDB, externalURL string) Engine

func NewExecV1DummyEngine

func NewExecV1DummyEngine() Engine

type EngineDB

type EngineDB interface {
	SaveBuildEvent(buildID int, event atc.Event) error

	FinishBuild(buildID int, status db.Status) error

	SaveBuildEngineMetadata(buildID int, metadata string) error

	SaveBuildInput(teamName string, buildID int, input db.BuildInput) (db.SavedVersionedResource, error)
	SaveBuildOutput(teamName string, buildID int, vr db.VersionedResource, explicit bool) (db.SavedVersionedResource, error)

	SaveImageResourceVersion(buildID int, planID atc.PlanID, identifier db.VolumeIdentifier) error
}

type Engines

type Engines []Engine

func (Engines) Lookup

func (engines Engines) Lookup(name string) (Engine, bool)

type StepMetadata

type StepMetadata struct {
	BuildID int

	PipelineName string
	JobName      string
	BuildName    string
	ExternalURL  string
}

func (StepMetadata) Env

func (metadata StepMetadata) Env() []string

type UnknownEngineError

type UnknownEngineError struct {
	Engine string
}

func (UnknownEngineError) Error

func (err UnknownEngineError) Error() string

Directories

Path Synopsis
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