Versions in this module Expand all Collapse all v0 v0.7.0 Feb 15, 2026 Changes in this version + type KeepGrid struct + func MustNewKeepGrid(regex, gridspec string) *KeepGrid + func NewKeepGrid(in *config.PruneGrid) (p *KeepGrid, err error) + func (p *KeepGrid) KeepRule(snaps []Snapshot) (destroyList []Snapshot) + type KeepLastN struct + func MustKeepLastN(n int, regex string) *KeepLastN + func NewKeepLastN(n int, regex string) (*KeepLastN, error) + func (k KeepLastN) KeepRule(snaps []Snapshot) (destroyList []Snapshot) + type KeepNotReplicated struct + func NewKeepNotReplicated() *KeepNotReplicated + func (*KeepNotReplicated) KeepRule(snaps []Snapshot) (destroyList []Snapshot) + type KeepRegex struct + func MustKeepRegex(expr string, negate bool) *KeepRegex + func NewKeepRegex(expr string, negate bool) (*KeepRegex, error) + func (k *KeepRegex) KeepRule(snaps []Snapshot) []Snapshot + type KeepRule interface + KeepRule func(snaps []Snapshot) (destroyList []Snapshot) + func RuleFromConfig(in config.PruningEnum) (KeepRule, error) + func RulesFromConfig(in []config.PruningEnum) (rules []KeepRule, err error) + type Snapshot interface + Date func() time.Time + Name func() string + Replicated func() bool + func PruneSnapshots(snaps []Snapshot, keepRules []KeepRule) []Snapshot