Versions in this module Expand all Collapse all v0 v0.1.1 Jul 27, 2026 v0.1.0 Jul 22, 2026 Changes in this version + var DefaultExcludedState = []string + var ErrDuplicateBranchName = errors.New("branching: duplicate branch name") + var ErrDuplicateHolderName = errors.New("branching: duplicate holder name") + var ErrEmptyBranchName = errors.New("branching: branch name is empty") + var ErrEmptyCheckpointID = errors.New("branching: checkpoint identity is empty") + var ErrEmptyGeneration = errors.New("branching: holder checkpoint generation is empty") + var ErrEmptyHolderName = errors.New("branching: holder name is empty") + var ErrNilBranch = errors.New("branching: holder returned a nil branch") + var ErrNilCheckpoint = errors.New("branching: holder returned a nil checkpoint") + var ErrNilEnvironmentFactory = errors.New("branching: environment factory is nil") + var ErrNilHolder = errors.New("branching: holder is nil") + var ErrNilReplacementHandle = errors.New("branching: holder returned a nil replacement handle") + var ErrReleasedCheckpoint = errors.New("branching: checkpoint is released") + type Branch struct + func (b *Branch) Environment() any + func (b *Branch) Evidence() Evidence + func (b *Branch) Finish(ctx context.Context) error + func (b *Branch) Handles() Handles + type BranchResult struct + Err error + Evidence Evidence + Name string + type BranchSpec struct + Continue func(context.Context, any, Evidence) error + Factory EnvironmentFactory + Name string + type Capability struct + Provider string + Version string + type Checkpoint struct + func (c *Checkpoint) Evidence() Evidence + func (c *Checkpoint) Release(ctx context.Context) error + func (c *Checkpoint) RunSequential(ctx context.Context, specs ...BranchSpec) []BranchResult + func (c *Checkpoint) StartBranch(ctx context.Context, name string, factory EnvironmentFactory) (*Branch, error) + type CheckpointMeta struct + ID string + ParentID string + Revision string + Source string + type CleanupEvidence struct + Quarantined []QuarantinedResource + Status string + type EnvironmentFactory func(context.Context, Handles) (any, error) + type Evidence struct + BranchName string + CheckpointID string + Cleanup CleanupEvidence + ExcludedState []string + Holders []HolderEvidence + Mechanism string + ParentCheckpointID string + Revision string + Scope Scope + Source string + type Handles map[string]any + type Holder interface + Capability func() Capability + Capture func(context.Context) (HolderCheckpoint, error) + type HolderBranch interface + Finish func(context.Context) error + Handle func() any + type HolderCheckpoint interface + Branch func(context.Context) (HolderBranch, error) + Generation func() string + Release func(context.Context) error + type HolderEvidence struct + Generation string + Name string + Provider string + Version string + type LifecycleError struct + Cause error + Holder string + Phase string + Quarantined []QuarantinedResource + func (e *LifecycleError) Error() string + func (e *LifecycleError) Unwrap() error + type QuarantinedResource struct + Err error + Holder string + Phase string + type Registration struct + Holder Holder + Name string + type Registry struct + func NewRegistry(registrations ...Registration) (*Registry, error) + func (r *Registry) Capture(ctx context.Context, meta CheckpointMeta) (*Checkpoint, error) + type Scope string + const MechanismBranch + const ScopeDatabaseOnly