cleaner

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2025 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 Worker

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

Worker performs a periodic cleanup of old snapshots. It cleans snapshots of all instances, not just itself.

func New

func New(name string, st simpleblob.Interface, cc config.Cleanup, logger logrus.FieldLogger) *Worker

func (*Worker) GetCommitted

func (w *Worker) GetCommitted(instance string) time.Time

GetCommitted retrieves the snapshot time of the last snapshot loaded by instance that was subsequently incorporated in one of our own snapshots. If no snapshot was loaded for this instance, it will return a zero time.

func (*Worker) Run

func (w *Worker) Run(ctx context.Context) error

func (*Worker) RunOnce

func (w *Worker) RunOnce(ctx context.Context, now time.Time) error

func (*Worker) SetCommitted

func (w *Worker) SetCommitted(last map[string]time.Time)

SetCommitted records the snapshot time of the last snapshots loaded by instance that was subsequently incorporated in one of our own snapshots.

Jump to

Keyboard shortcuts

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