pruning

package
v2.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	CoreComponent *app.CoreComponent
)
View Source
var ParamsPruning = &ParametersPruning{}

Functions

This section is empty.

Types

type ParametersPruning

type ParametersPruning struct {
	Milestones struct {
		// Enabled defines whether to delete old block data from the database based on maximum milestones to keep
		Enabled bool `default:"false" usage:"whether to delete old block data from the database based on maximum milestones to keep"`
		// MaxMilestonesToKeep defines the maximum amount of milestone cones to keep in the database
		MaxMilestonesToKeep int `default:"60480" usage:"maximum amount of milestone cones to keep in the database"`
	}
	Size struct {
		// Enabled defines whether to delete old block data from the database based on maximum database size
		Enabled bool `default:"true" usage:"whether to delete old block data from the database based on maximum database size"`
		// TargetSize defines the target size of the database
		TargetSize string `default:"30GB" usage:"target size of the database"`
		// ThresholdPercentage defines the percentage the database size gets reduced if the target size is reached
		ThresholdPercentage float64 `default:"10.0" usage:"the percentage the database size gets reduced if the target size is reached"`
		// CooldownTime defines the cooldown time between two pruning by database size events
		CooldownTime time.Duration `default:"5m" usage:"cooldown time between two pruning by database size events"`
	}

	// PruneReceipts defines whether to delete old receipts data from the database
	PruneReceipts bool `default:"false" usage:"whether to delete old receipts data from the database"`
}

ParametersPruning contains the definition of the parameters used by pruning.

Jump to

Keyboard shortcuts

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