reconcile

package
v0.1.0-dev.20260222210907 Latest Latest
Warning

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

Go to latest
Published: Feb 22, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Entry

type Entry struct {
	RelTarget string
	Source    string
	Target    string
	Project   string
	Action    string
	State     State
	Message   string
}

Entry represents a single file in the reconcile report.

type Report

type Report struct {
	TargetRoot  string
	SourceRoot  string
	Projects    []string
	FromReceipt bool
	ReceiptPath string
	Entries     []Entry
}

Report contains the reconciliation results.

func FromBuildResult

func FromBuildResult(result *tree.BuildResult) *Report

FromBuildResult creates a report from a tree build result by scanning the target directory for each expected file.

func ScanTarget

func ScanTarget(targetRoot, sourceRoot string) *Report

ScanTarget scans the target directory for symlinks pointing to source.

func (*Report) Summary

func (r *Report) Summary() map[State]int

Summary returns counts by state.

type State

type State int

State represents the reconciliation state of a deployed entry.

const (
	// StateLinked means the symlink exists and points correctly.
	StateLinked State = iota
	// StateCopied means the file was copied and exists.
	StateCopied
	// StateConflict means the target exists but doesn't match expectations.
	StateConflict
	// StateMissing means the expected target doesn't exist.
	StateMissing
	// StateOrphan means the symlink target no longer exists.
	StateOrphan
	// StateStale means the source changed since deployment.
	StateStale
	// StateModified means the target was locally modified.
	StateModified
	// StateDriftConflict means both source and target changed.
	StateDriftConflict
)

func (State) Label

func (s State) Label() string

Label returns a machine-readable label for JSON output.

func (State) String

func (s State) String() string

String returns the status indicator for display.

Jump to

Keyboard shortcuts

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