pruning

package
v3.1.1-stargate Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2022 License: CC0-1.0 Imports: 8 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunAdditionalOperations

func RunAdditionalOperations(cfg *Config) error

RunAdditionalOperations runs the additional operations for the pruning module

Types

type Config

type Config struct {
	KeepRecent int64 `yaml:"keep_recent"`
	KeepEvery  int64 `yaml:"keep_every"`
	Interval   int64 `yaml:"interval"`
}

func NewConfig

func NewConfig(keepRecent, keepEvery, interval int64) *Config

NewConfig allows to build a new Config instance

func ParseConfig

func ParseConfig(bz []byte) (*Config, error)

type Module

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

Module represents the pruning module allowing to clean the database periodically

func NewModule

func NewModule(cfg config.Config, db database.Database, logger logging.Logger) *Module

NewModule builds a new Module instance

func (*Module) HandleBlock

func (m *Module) HandleBlock(
	block *tmctypes.ResultBlock, _ *tmctypes.ResultBlockResults, _ []*types.Tx, _ *tmctypes.ResultValidators,
) error

HandleBlock implements modules.BlockModule

func (*Module) Name

func (m *Module) Name() string

Name implements modules.Module

func (*Module) RunAdditionalOperations

func (m *Module) RunAdditionalOperations() error

RunAdditionalOperations implements

Jump to

Keyboard shortcuts

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