processor

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 29 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 ErrSkipDone = errors.New("skip step marked as successful")

Functions

func AbortOnError

func AbortOnError(err error) bool

func PrefixName

func PrefixName(name, prefix string) string

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 EventEmitter

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

func (*EventEmitter) Bootstrap

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

type Executable

type Executable func(ctx context.Context) (StepContext, error)

type ExpressionParser

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

func (*ExpressionParser) Bootstrap

func (s *ExpressionParser) Bootstrap(pipeline Pipeline, next Next) (Next, 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 Inherit

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

func (*Inherit) Bootstrap

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

func (*Inherit) MarshalJSON

func (s *Inherit) MarshalJSON() ([]byte, error)

func (*Inherit) UnmarshalJSON

func (s *Inherit) UnmarshalJSON(b []byte) error

type Matrix

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

func (*Matrix) Bootstrap

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

func (*Matrix) MarshalJSON

func (s *Matrix) MarshalJSON() ([]byte, error)

func (*Matrix) UnmarshalJSON

func (s *Matrix) UnmarshalJSON(b []byte) 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 Otel

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

func (*Otel) Bootstrap

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

type OutputCloser

type OutputCloser func(err error)

type OutputFactory

type OutputFactory func(name string, stdin io.Reader, stdout, stderr io.Writer) (io.Reader, io.Writer, io.Writer, OutputCloser)

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)
	Name() string
	ID() string
}

type PipelineBuilder

type PipelineBuilder interface {
	Build(pipeline v1beta1.Pipeline, entrypoint string, inputs map[string]string) (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() ProcessorBuilder

func WithEventEmitter

func WithEventEmitter() ProcessorBuilder

func WithExpressionParser

func WithExpressionParser(celEnv *cel.Env, processors ...Bootstraper) 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 WithMatrix

func WithMatrix() ProcessorBuilder

func WithNeeds

func WithNeeds() ProcessorBuilder

func WithOtel

func WithOtel(logger logr.Logger, tracer trace.Tracer, meter metric.Meter) ProcessorBuilder

func WithPipe

func WithPipe() ProcessorBuilder

func WithReport

func WithReport(store ResultStore, uniqueName string) ProcessorBuilder

func WithRetry

func WithRetry() ProcessorBuilder

func WithRun

func WithRun(tee bool, defaultPullPolicy runtime.PullImagePolicy, driver runtime.Interface, outputFactory OutputFactory, stdin io.Reader, stdout, stderr io.Writer) ProcessorBuilder

func WithSkipDone

func WithSkipDone(skipDone bool) ProcessorBuilder

func WithStdio

func WithStdio() ProcessorBuilder

func WithTimeout

func WithTimeout() ProcessorBuilder

type Report

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

func (*Report) Bootstrap

func (s *Report) 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)

func (*Run) MarshalJSON

func (s *Run) MarshalJSON() ([]byte, error)

func (*Run) UnmarshalJSON

func (s *Run) UnmarshalJSON(b []byte) 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)

func (*Stdio) MarshalJSON

func (s *Stdio) MarshalJSON() ([]byte, error)

func (*Stdio) UnmarshalJSON

func (s *Stdio) UnmarshalJSON(b []byte) error

type Step

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

type StepContext

type StepContext struct {
	Matrix map[string]interface{}

	Steps      map[string]*StepResult
	Envs       map[string]string
	Containers map[string]cruntime.ContainerStatus
	NamePrefix string
	Env        string
	Parent     string
	Output     string
	Stdin      io.Reader
	Stdout     io.Writer
	Stderr     io.Writer
	// contains filtered or unexported fields
}

func NewContext

func NewContext(tmpDir string, inputs map[string]interface{}) StepContext

func (StepContext) Child

func (t StepContext) Child() StepContext

func (StepContext) DeepCopy

func (c StepContext) DeepCopy() StepContext

func (StepContext) FromV1Beta1

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

func (StepContext) Merge

func (t StepContext) Merge(c StepContext) StepContext

func (StepContext) RuntimeVars

func (t StepContext) RuntimeVars() map[string]interface{}

func (StepContext) TmpDir

func (t StepContext) TmpDir() string

func (StepContext) ToV1Beta1

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

type StepResult

type StepResult struct {
	StartedAt  time.Time
	EndedAt    time.Time
	Outputs    map[string]string
	Envs       map[string]string
	Containers map[string]cruntime.ContainerStatus
	Error      error
}

func (*StepResult) Duration

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

type Teardown

type Teardown func(ctx context.Context) error

type Timeout

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

func (*Timeout) Bootstrap

func (s *Timeout) 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