pipelines

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: AGPL-3.0 Imports: 7 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrBatonNotPresent indicates the wrong type of data structure passed between pipelines. Internal / Programmatic error
	ErrBatonNotPresent = errors.New("right data structure not present between pipelines")
)

Functions

This section is empty.

Types

type OnGenericFunc

type OnGenericFunc func() error

OnGenericFunc represents a function that returns an error or otherwise

type OnProfileFunc

type OnProfileFunc func(profile *Profile) error

OnProfileFunc is a function executed on the receipt of a given profile

type Pipeline

type Pipeline interface {
	// Runs a bunch of processes based on the given config
	Run(config *config.Config, buildID cidocker.BuildID, myBaton *baton.Baton) PipelineRunReturnFunc

	// GetNames returns the names of the pipelines . Returns a tuple , a key and a long descriptive name
	GetNames() (key string, longName string)
}

Pipeline builds and executes a given set of commands

type PipelineRunReturnFunc

type PipelineRunReturnFunc func(ctx context.Context, log logger.Log) (cidocker.BuildID, error)

PipelineRunReturnFunc represents the functor to return after a pipeline run

type Profile

type Profile struct {
	Name string

	Begin time.Time

	End time.Time

	Duration time.Duration
}

Profile represents the start and end time of a profile

func NewProfile

func NewProfile(name string) *Profile

NewProfile creates a new profile

func RunProfile

func RunProfile(name string, fnOnGenericFunc OnGenericFunc) (*Profile, error)

RunProfile returns a profile along with the status of the function

func (*Profile) Start

func (profile *Profile) Start()

func (*Profile) Stop

func (profile *Profile) Stop()

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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