pipeline

package
v0.0.0-...-499c98a Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 24 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ExitSuccess      = 0
	ExitChanges      = 2 // Changes detected (diff mode)
	ExitPolicyBlock  = 3 // Blocked by risk policy
	ExitSourceHealth = 4 // Source health failure
)

ExitCode constants for CLI.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchSyncResult

type BatchSyncResult struct {
	Results          []SyncResult
	ChangeSets       []*diff.ChangeSet
	PRNumber         int
	PRDraft          bool
	AutoMergeEnabled bool
	Skipped          bool
	SkipReason       string
}

BatchSyncResult holds the outcome of a batch sync run.

type GitOps

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

GitOps handles git operations for the catalog repo.

func OpenRepo

func OpenRepo(path, token string) (*GitOps, error)

OpenRepo opens a git repository at the given path.

func (*GitOps) AddAll

func (g *GitOps) AddAll() error

AddAll stages all changes.

func (*GitOps) Commit

func (g *GitOps) Commit(message string) error

Commit creates a commit with the given message.

func (*GitOps) CreateBranch

func (g *GitOps) CreateBranch(name string) error

CreateBranch creates and checks out a new branch.

func (*GitOps) Push

func (g *GitOps) Push() error

Push pushes the current branch to origin.

type Pipeline

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

Pipeline orchestrates the full sync workflow.

func New

func New(cfg *config.Config) *Pipeline

New creates a new Pipeline.

func (*Pipeline) Diff

func (p *Pipeline) Diff(ctx context.Context) ([]diff.ChangeSet, error)

Diff runs discovery and diff without writing changes.

func (*Pipeline) LoadCatalog

func (p *Pipeline) LoadCatalog() error

LoadCatalog loads the existing catalog from disk.

func (*Pipeline) Sync

func (p *Pipeline) Sync(ctx context.Context) ([]SyncResult, error)

Sync runs the full pipeline for the configured providers.

func (*Pipeline) SyncBatch

func (p *Pipeline) SyncBatch(ctx context.Context) (*BatchSyncResult, error)

SyncBatch discovers all configured providers, writes only safe changes, and creates one catalog PR for the run. Provider-level failures are reported in the result but do not block unrelated safe provider changes.

type SourceHealthError

type SourceHealthError struct {
	Provider string
	Reason   string
}

SourceHealthError indicates a source health check failure (exit code 4).

func (*SourceHealthError) Error

func (e *SourceHealthError) Error() string

type SyncResult

type SyncResult struct {
	Provider    string
	ChangeSet   *diff.ChangeSet
	JudgeResult *judge.Result
	PRNumber    int
	PRDraft     bool
	Skipped     bool
	SkipReason  string
	Error       error
}

SyncResult holds the outcome of a sync for one provider.

Jump to

Keyboard shortcuts

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