migraterun

package
v0.182.4 Latest Latest
Warning

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

Go to latest
Published: Oct 6, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package migraterun coordinates migration effects without CLI policy or streams.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CampaignCompletion

type CampaignCompletion struct {
	SpecID string
	Failed bool
}

type CampaignRequest

type CampaignRequest struct {
	SpecPath                                        string
	Roots                                           []string
	GitHubDir, ReportDir, Ref                       string
	ModuleRefs                                      map[string]string
	Apply, Resume, Commit, Push, PR, Merge, Cleanup bool
	Verify                                          migrate.Verification
	Parallel                                        int
	PrepareProgress                                 func(specID string) progress.Reporter
	BeforePersist                                   func(CampaignCompletion)
}

type CampaignResult

type CampaignResult struct {
	Report   migrate.CampaignReport
	Removed  []string
	Cleanup  bool
	RunError error
}

type LocalRequest

type LocalRequest struct {
	SpecPath  string
	Roots     []string
	Apply     bool
	ReportDir string
}

type LocalResult

type LocalResult struct {
	Report     migrate.Report
	HasChanges bool
}

type Operations

type Operations struct {
	Load                     func(string) (migrate.Spec, error)
	BuildPlan                func(migrate.Spec, ...string) (migrate.Plan, error)
	Apply                    func(migrate.Plan) error
	EnsureRoot               func(string) (string, error)
	RunCampaign              func(migrate.Spec, string, migrate.CampaignOptions) (migrate.CampaignReport, error)
	CleanupCampaignWorktrees func(string, string) ([]string, error)
	WriteReports             func(string, migrate.Report) error
	WriteCampaignReports     func(string, migrate.CampaignReport) error
}

func DefaultOperations

func DefaultOperations() Operations

func (Operations) Campaign

func (ops Operations) Campaign(_ context.Context, request CampaignRequest) (CampaignResult, error)

Campaign returns an execution error separately so presentation can render the persisted report first. Setup/persistence errors take precedence over that error.

func (Operations) Local

func (ops Operations) Local(_ context.Context, request LocalRequest) (LocalResult, error)

Local preserves the synchronous engine's existing context-independent behavior.

Jump to

Keyboard shortcuts

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