clean

package
v1.7.15 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 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(args ArgOldDataCleanerProvider) (*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 ArgOldDataCleanerProvider added in v1.6.0

type ArgOldDataCleanerProvider struct {
	NodeTypeProvider    NodeTypeProviderHandler
	PruningStorerConfig config.StoragePruningConfig
	ManagedPeersHolder  storage.ManagedPeersHolder
}

ArgOldDataCleanerProvider is the argument used to create a new oldDataCleanerProvider instance

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