retention

package
v1.10.4 Latest Latest
Warning

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

Go to latest
Published: Nov 4, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Recovery

type Recovery struct {
	// contains filtered or unexported fields
}

Recovery reclaims a fixed host layout after independent service fencing. The host must reserve the root for this installation and coordinate writers. It never unmounts or recursively deletes content. No descriptors are retained between operations.

func NewCredentials

func NewCredentials(root string, fence func(context.Context, id.ID) error) (*Recovery, error)

NewCredentials binds the private launch directory. Cleanup removes only the fixed claim file or interrupted temporary file after service fencing.

func NewWorkspaces

func NewWorkspaces(root string, fence func(context.Context, id.ID) error) (*Recovery, error)

NewWorkspaces binds an existing private root-owned workspace directory on Linux. Fence must durably prevent starts and confirm complete service/cgroup drain. It must honor cancellation; execution permission alone is not cleanup proof.

func (*Recovery) Discover

func (r *Recovery) Discover(ctx context.Context, maximum int) ([]id.ID, error)

Discover returns a sorted bounded snapshot of canonical retained job IDs. Invalid entries or overflow fail the entire snapshot before any cleanup.

func (*Recovery) Reclaim

func (r *Recovery) Reclaim(ctx context.Context, key id.ID) error

Reclaim fences the service before inspecting its retained directory. Only the selected layout on the original root filesystem may be removed. Partial setup and already absent directories are valid; uncertainty requires retry.

Jump to

Keyboard shortcuts

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