archival

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Mar 8, 2026 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cleaner

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

Cleaner periodically removes completed jobs older than the retention period.

func New

func New(cfg Config) *Cleaner

New creates a new archival cleaner.

func (*Cleaner) Start

func (c *Cleaner) Start(ctx context.Context)

Start begins the archival loop. Non-blocking.

func (*Cleaner) Stop

func (c *Cleaner) Stop()

Stop halts the archival loop.

type Config

type Config struct {
	Store *store.RedisStore
	// RetentionPeriod is how long completed/failed/dead jobs are kept.
	// Jobs older than this are deleted. Default: 7 days.
	RetentionPeriod time.Duration
	// ScanInterval is how often the cleaner runs. Default: 1 hour.
	ScanInterval time.Duration
	// BatchSize is the number of jobs to process per scan iteration. Default: 100.
	BatchSize int
	Logger    gochainedlog.Logger
}

Config configures the archival cleaner.

Jump to

Keyboard shortcuts

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