gc

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: MIT Imports: 18 Imported by: 0

Documentation

Overview

Package gc provides garbage collection for snapshots.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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