gc

package
v0.4.7 Latest Latest
Warning

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

Go to latest
Published: May 5, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package gc provides garbage collection for snapshots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RemoveRuntimePlans added in v0.4.7

func RemoveRuntimePlans(repoRoot string) (int, error)

RemoveRuntimePlans removes top-level cleanup preview/run plan state. Durable cleanup evidence under child directories is left intact.

Types

type Collector

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

Collector handles garbage collection of unused snapshots.

func NewCollector

func NewCollector(repoRoot string) *Collector

NewCollector creates a new GC collector.

func (*Collector) LoadPlan

func (c *Collector) LoadPlan(planID string) (*model.GCPlan, error)

LoadPlan loads a GC plan by ID.

func (*Collector) Plan

func (c *Collector) Plan() (*model.GCPlan, error)

Plan creates a GC plan.

func (*Collector) PlanWithPolicy

func (c *Collector) PlanWithPolicy(policy model.RetentionPolicy) (*model.GCPlan, error)

PlanWithPolicy creates a GC plan using the given retention policy.

func (*Collector) Run

func (c *Collector) Run(planID string) error

Run executes a GC plan.

func (*Collector) SetProgressCallback

func (c *Collector) SetProgressCallback(cb func(string, int, int, string))

SetProgressCallback sets a callback for progress updates.

Jump to

Keyboard shortcuts

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