processor

package
v0.0.23 Latest Latest
Warning

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

Go to latest
Published: May 5, 2025 License: Apache-2.0 Imports: 30 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAllowFailure = errors.New("ignore error returned from step")
View Source
var ErrConditionFalse = errors.New("conditional step skipped")
View Source
var ErrEmptyMatrix = errors.New("empty matrix")
View Source
var ErrSkipBlacklist = errors.New("skip blacklisted step")
View Source
var ErrSkipDone = errors.New("skip step marked as successful")

Functions

func AbortOnError

func AbortOnError(err error) bool

func Subst added in v0.0.19

func Subst(index Indexable, substitute ...any) error

Types

type AllowFailure

type AllowFailure struct {
}

func (*AllowFailure) Bootstrap

func (s *AllowFailure) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type And

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

func (*And) Bootstrap

func (s *And) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Bootstraper

type Bootstraper interface {
	Bootstrap(pipeline Pipeline, next Next) (Next, error)
}

func Builder

func Builder(spec *v1beta1.Step, builders ...ProcessorBuilder) []Bootstraper

type Concurrent

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

func (*Concurrent) Bootstrap

func (s *Concurrent) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Env added in v0.0.7

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

func (*Env) Bootstrap added in v0.0.7

func (s *Env) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Executable

type Executable func(ctx context.Context) (StepContext, map[string]v1beta1.ParamValue, error)

type GarbageCollector

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

func (*GarbageCollector) Bootstrap

func (s *GarbageCollector) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type If

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

func (*If) Bootstrap

func (s *If) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Indexable added in v0.0.19

type Indexable interface {
	Index() map[string]string
}

type Inherit

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

func (*Inherit) Bootstrap

func (s *Inherit) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Input added in v0.0.19

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

func (*Input) Bootstrap added in v0.0.19

func (s *Input) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Logger added in v0.0.19

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

func (*Logger) Bootstrap added in v0.0.19

func (s *Logger) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Matrix

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

func (*Matrix) Bootstrap

func (s *Matrix) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Needs

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

func (*Needs) Bootstrap

func (s *Needs) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Next

type Next func(ctx context.Context, stepContext StepContext) (StepContext, error)

func Chain

func Chain(pipeline Pipeline, s ...Bootstraper) (Next, error)

type OtelMetrics added in v0.0.7

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

func (*OtelMetrics) Bootstrap added in v0.0.7

func (s *OtelMetrics) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type OtelTrace added in v0.0.7

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

func (*OtelTrace) Bootstrap added in v0.0.7

func (s *OtelTrace) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Output added in v0.0.19

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

func (*Output) Bootstrap added in v0.0.19

func (s *Output) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type OutputCloser

type OutputCloser func(err error) error

type OutputFactory

type OutputFactory func(ctx context.Context, stepContext StepContext, stepName string) (io.Writer, io.Writer, OutputCloser)

type OutputParam added in v0.0.19

type OutputParam struct {
	Name string
	Path string
}

type Pipe

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

func (*Pipe) Bootstrap

func (s *Pipe) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Pipeline

type Pipeline interface {
	Step(name string) (Step, error)
	Entrypoint(name string) (Next, error)
	EntrypointName() (string, error)
	Name() string
	ID() string
}

type PipelineBuilder

type PipelineBuilder interface {
	Build(pipeline v1beta1.Pipeline, entrypoint string, inputs map[string]v1beta1.ParamValue, stepCtx StepContext) (Executable, error)
}

type ProcessorBuilder

type ProcessorBuilder func(spec *v1beta1.Step) Bootstraper

func WithAllowFailure

func WithAllowFailure() ProcessorBuilder

func WithAnd

func WithAnd() ProcessorBuilder

func WithConcurrent

func WithConcurrent(pool pond.Pool) ProcessorBuilder

func WithEnv added in v0.0.7

func WithEnv(osEnv, defaultEnv map[string]string) ProcessorBuilder

func WithGarbageCollector

func WithGarbageCollector(noGC bool, driver runtime.Interface, teardown chan Teardown) ProcessorBuilder

func WithIf

func WithIf(celEnv *cel.Env) ProcessorBuilder

func WithInherit

func WithInherit(builder PipelineBuilder, store storage.Interface) ProcessorBuilder

func WithInput added in v0.0.19

func WithInput(celEnv *cel.Env) ProcessorBuilder

func WithLogger added in v0.0.19

func WithLogger(logger logr.Logger, zapConfig *zap.Config) ProcessorBuilder

func WithMatrix

func WithMatrix(pool pond.Pool) ProcessorBuilder

func WithNeeds

func WithNeeds() ProcessorBuilder

func WithOtelMetrics added in v0.0.7

func WithOtelMetrics(meter metric.Meter) ProcessorBuilder

func WithOtelTrace added in v0.0.7

func WithOtelTrace(logger logr.Logger, tracer trace.Tracer) ProcessorBuilder

func WithOutput added in v0.0.19

func WithOutput() ProcessorBuilder

func WithPipe

func WithPipe(tee bool) ProcessorBuilder

func WithProgress added in v0.0.19

func WithProgress(progress bool) ProcessorBuilder

func WithRecover added in v0.0.19

func WithRecover() ProcessorBuilder

func WithReport

func WithReport(store ResultStore) ProcessorBuilder

func WithResult added in v0.0.7

func WithResult() ProcessorBuilder

func WithRetry

func WithRetry() ProcessorBuilder

func WithRun

func WithRun(defaultPullPolicy runtime.PullImagePolicy, driver runtime.Interface, outputFactory OutputFactory, teardown chan Teardown) ProcessorBuilder

func WithSkipBlacklist added in v0.0.7

func WithSkipBlacklist(blacklist []string) ProcessorBuilder

func WithSkipDone

func WithSkipDone(skipDone bool) ProcessorBuilder

func WithStdio

func WithStdio(outputFactory OutputFactory, withInternals bool) ProcessorBuilder

func WithStdioRedirect added in v0.0.19

func WithStdioRedirect(tee bool) ProcessorBuilder

func WithTemplate added in v0.0.19

func WithTemplate(template v1beta1.Template) ProcessorBuilder

func WithTimeout

func WithTimeout() ProcessorBuilder

func WithTmpDir added in v0.0.9

func WithTmpDir() ProcessorBuilder

type Progress added in v0.0.19

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

func (*Progress) Bootstrap added in v0.0.19

func (s *Progress) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Recover added in v0.0.19

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

func (*Recover) Bootstrap added in v0.0.19

func (s *Recover) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Report

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

func (*Report) Bootstrap

func (s *Report) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Result added in v0.0.7

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

func (*Result) Bootstrap added in v0.0.7

func (s *Result) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type ResultStore

type ResultStore interface {
	Add(stepName string, result *StepResult)
}

type Retry

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

func (*Retry) Bootstrap

func (s *Retry) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Run

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

func (*Run) Bootstrap

func (s *Run) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type SkipBlacklist added in v0.0.7

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

func (*SkipBlacklist) Bootstrap added in v0.0.7

func (s *SkipBlacklist) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type SkipDone

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

func (*SkipDone) Bootstrap

func (s *SkipDone) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Stdio

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

func (*Stdio) Bootstrap

func (s *Stdio) Bootstrap(pipelineCtx Pipeline, next Next) (Next, error)

type StdioRedirect added in v0.0.19

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

func (*StdioRedirect) Bootstrap added in v0.0.19

func (s *StdioRedirect) Bootstrap(pipelineCtx Pipeline, next Next) (Next, error)

type Step

type Step interface {
	Processors() []Bootstraper
	Entrypoint() (Next, error)
}

type StepContext

type StepContext struct {
	Dir              string
	DataDir          string
	Matrix           map[string]string
	Inputs           map[string]v1beta1.ParamValue
	Steps            map[string]*StepResult
	Envs             map[string]string
	Containers       map[string]cruntime.ContainerStatus
	Tags             map[string]string
	NamePrefix       string
	Env              string
	Outputs          []OutputParam
	Stdin            io.Reader
	Stdout           io.Writer
	Stderr           io.Writer
	AdditionalStdout []io.Writer
	AdditionalStderr []io.Writer
	Template         *v1beta1.Template
}

func NewContext

func NewContext() StepContext

func (StepContext) DeepCopy

func (c StepContext) DeepCopy() StepContext

func (StepContext) FromV1Beta1

func (t StepContext) FromV1Beta1(vars *v1beta1.Context)

func (StepContext) Merge

func (t StepContext) Merge(c StepContext) StepContext

func (StepContext) ToV1Beta1

func (t StepContext) ToV1Beta1() *v1beta1.Context

type StepResult

type StepResult struct {
	StartedAt time.Time
	EndedAt   time.Time
	Outputs   map[string]v1beta1.ParamValue
	Error     error
	DataDir   string
}

func (*StepResult) Duration

func (t *StepResult) Duration() time.Duration

type Teardown

type Teardown func(ctx context.Context) error

type Template added in v0.0.19

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

func (*Template) Bootstrap added in v0.0.19

func (s *Template) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type Timeout

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

func (*Timeout) Bootstrap

func (s *Timeout) Bootstrap(pipeline Pipeline, next Next) (Next, error)

type TmpDir added in v0.0.9

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

func (*TmpDir) Bootstrap added in v0.0.9

func (s *TmpDir) Bootstrap(pipeline Pipeline, next Next) (Next, error)

Jump to

Keyboard shortcuts

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