clean

package
v1.4.8 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2023 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewOldDataCleanerProvider

func NewOldDataCleanerProvider(
	nodeTypeProvider NodeTypeProviderHandler,
	pruningStorerConfig config.StoragePruningConfig,
) (*oldDataCleanerProvider, error)

NewOldDataCleanerProvider returns a new instance of oldDataCleanerProvider

func NewOldDatabaseCleaner

func NewOldDatabaseCleaner(args ArgsOldDatabaseCleaner) (*oldDatabaseCleaner, error)

NewOldDatabaseCleaner returns a new instance of oldDatabaseCleaner

Types

type ArgsOldDatabaseCleaner

type ArgsOldDatabaseCleaner struct {
	DatabasePath           string
	StorageListProvider    StorageListProviderHandler
	EpochStartNotifier     EpochStartNotifier
	OldDataCleanerProvider OldDataCleanerProvider
}

ArgsOldDatabaseCleaner holds the arguments needed for creating an oldDatabaseCleaner

type EpochStartNotifier

type EpochStartNotifier interface {
	RegisterHandler(handler epochStart.ActionHandler)
	IsInterfaceNil() bool
}

EpochStartNotifier defines what a component which will handle registration to epoch start event should do

type NodeTypeProviderHandler

type NodeTypeProviderHandler interface {
	SetType(nodeType core.NodeType)
	GetType() core.NodeType
	IsInterfaceNil() bool
}

NodeTypeProviderHandler defines the actions needed for a component that can handle the node type

type OldDataCleanerProvider

type OldDataCleanerProvider interface {
	ShouldClean() bool
	IsInterfaceNil() bool
}

OldDataCleanerProvider defines what a component that handles the deletion or keeping of old data should do

type StorageListProviderHandler

type StorageListProviderHandler interface {
	GetAllStorers() map[dataRetriever.UnitType]storage.Storer
	IsInterfaceNil() bool
}

StorageListProviderHandler defines the actions needed for returning all storers

Jump to

Keyboard shortcuts

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