Documentation
¶
Overview ¶
Package reconcile adapts the flat snapshots the endpoint protocol carries to the nested tree Mutagen's reconciler operates on, and converts the changes it produces back into the transition the protocol applies.
The reconciliation itself is Mutagen's. What lives here is the shape conversion and the platform's own rules: two-way-safe, so a path changed on both sides is quarantined rather than resolved by guessing.
Index ¶
Constants ¶
Mode is two-way-safe: neither side wins automatically. A path changed on both sides becomes a conflict, which quarantines that path and leaves everything else syncing — the alternative resolves by policy and silently discards work.
Variables ¶
This section is empty.
Functions ¶
func DigestsNeeded ¶
DigestsNeeded returns the content digests a side must be given before the changes can be applied, so staging happens before the transition.
Types ¶
type Conflict ¶
Conflict names a path both sides changed, with a human-readable account of what each did.
type Result ¶
type Result struct {
// ToLocal and ToRemote are the changes each side must apply.
ToLocal []*syncv1.Change
ToRemote []*syncv1.Change
// Conflicts are paths changed on both sides. They are quarantined, not
// resolved: both versions survive and unrelated work is not held hostage.
Conflicts []Conflict
// Ancestor is the agreed state to record once the cycle completes. It is
// committed only after both sides have applied, so an interruption
// recomputes on the next pass rather than recording a state that is not
// true on disk.
Ancestor *core.Entry
}
Result is one reconciliation pass.