Help us shape the future of Go! Take the 2026 Go Developer Survey

pipeline

package
v1.10.2 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnknownPatcher = errors.New("unknown pipeline patcher")

Functions

func MergeFacts

func MergeFacts(nodes []types.Node, edges []types.Edge, facts []types.Fact) ([]types.Node, []types.Edge)

Types

type Builder

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

func NewBuilder

func NewBuilder(cfg Config) *Builder

func (*Builder) Build

func (b *Builder) Build(ctx context.Context, req types.BuildRequest) (Result, error)

type Config

type Config struct {
	Detect       func(root string) ([]string, error)
	Scanner      Scanner
	Registry     *scip.Registry
	Patchers     map[string]Patcher
	GraphBuilder func([]types.Node, []types.Edge) (*igraph.Graph, error)
	Cluster      func(*igraph.Graph) (map[string]int, error)
	Persist      func(*types.Graph, string) error
	OutDir       string
	Observer     Observer
}

type Observer

type Observer func(StageEvent)

type Patcher

type Patcher interface {
	Name() string
	Patch(ctx context.Context, build types.BuildRequest, facts []types.Fact) ([]types.Fact, error)
}

type Result

type Result struct {
	Graph         *types.Graph
	Facts         []types.Fact
	Warnings      []string
	DetectedFiles []string
	GraphPath     string
	StageReports  []StageReport
}

type Scanner

type Scanner interface {
	Scan(root string, files []string, src *types.Source) ([]types.Node, []types.Edge, error)
}

type StageEvent

type StageEvent struct {
	Stage   types.BuildStage
	Count   int
	Message string
}

type StageReport

type StageReport struct {
	Stage types.BuildStage
	Count int
}

Jump to

Keyboard shortcuts

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