Documentation
¶
Overview ¶
Package reconcile implements drift detection and repair for writ deployments.
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 ¶
ScanTarget scans the target directory for symlinks pointing to source.
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 )
Click to show internal directories.
Click to hide internal directories.