sweeper

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: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SyncDBIPrefix is the shared DBI name prefix for all special tables that
	// must not be synced.
	// TODO: Duplicated from syncer to prevent import loop, move somewhere else
	SyncDBIPrefix = "_sync"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sweeper

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

Sweeper cleans old stale deleted entries from a single LMDB. This is also known as the "tomb sweeper". You need one Sweeper per LMDB. Do not confuse this with the Cleaner, which cleans snapshots.

func New

func New(name string, conf config.Sweeper, env *lmdb.Env, l logrus.FieldLogger, schemaTracksChanges bool) *Sweeper

func (*Sweeper) Run

func (s *Sweeper) Run(ctx context.Context) error

Run runs the sweeper according to the configured schedule. It only runs when an error occurs or the context is closed.

Jump to

Keyboard shortcuts

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