pipeline

package
v0.1.24 Latest Latest
Warning

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

Go to latest
Published: Aug 3, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0

Documentation

Overview

Package pipeline assembles built command segments into a runnable typed-stream pipeline and executes it against the gloo-foo/framework.

Plan folds an ordered list of stages into an Assembly: the first stage chooses the input source (a source command, named files, or stdin) and later stages must be plain filters. Assembly.Run streams the result to an output writer. The package knows how to wire and run segments; it does not know how a segment is built (that is internal/command) nor how a line is parsed (the line domain).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assembly

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

Assembly is the resolved plan for a pipeline: an input source and the ordered transform commands applied to it. It is an immutable value: the add* methods take the assembly by value and return the extended assembly, and Run only reads the finished plan.

func Plan

func Plan(stages []Stage, fs afero.Fs, stdin io.Reader) (Assembly, error)

Plan turns built stages into an Assembly. The first stage chooses the input source (a source command, named files, or stdin); later stages must be plain filters.

func (Assembly) Run

func (a Assembly) Run(ctx context.Context, out io.Writer) error

Run executes the assembled pipeline, writing output to out.

type Stage

type Stage struct {
	Name    command.Name
	Segment command.Segment
}

Stage pairs a built segment with the command name that produced it, so assembly errors can name the offending command.

Jump to

Keyboard shortcuts

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