util

package
v1.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataManager

type DataManager interface {
	DeleteLoop(*sync.WaitGroup, *uint64)
}

DataManager is a data pruning interface

func MakeDataManager

func MakeDataManager(ctx context.Context, cfg *PruneConfigurations, db idb.IndexerDb, logger *logrus.Logger) DataManager

MakeDataManager initializes resources need for removing data from data source

type Interval

type Interval int

Interval determines how often to delete data

type PruneConfigurations

type PruneConfigurations struct {
	// Rounds to keep, a value of zero results in no data pruning
	Rounds uint64 `yaml:"rounds"`
	// Interval used to prune the data. The values can be -1 to run at startup,
	// 0 to disable or N to run every N rounds.
	Interval Interval `yaml:"interval"`
}

PruneConfigurations contains the configurations for data pruning

Jump to

Keyboard shortcuts

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