reap

package
v0.0.0-...-095633c Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2024 License: Apache-2.0, Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package reap contains the history reaping subsystem for aurora. This system is designed to remove data from the history database such that it does not grow indefinitely. The system can be configured with a number of ledgers to maintain at a minimum.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type System

type System struct {
	HistoryQ       *history.Q
	RetentionCount uint
	RetentionBatch uint
	// contains filtered or unexported fields
}

System represents the history reaping subsystem of aurora.

func New

func New(retention, retentionBatchSize uint, dbSession db.SessionInterface, ledgerState *ledger.State) *System

New initializes the reaper, causing it to begin polling the hcnet-core database for now ledgers and ingesting data into the aurora database.

func (*System) DeleteUnretainedHistory

func (r *System) DeleteUnretainedHistory(ctx context.Context) error

DeleteUnretainedHistory removes all data associated with unretained ledgers.

func (*System) Run

func (r *System) Run()

Run triggers the reaper system to update itself, deleted unretained history if it is the appropriate time.

func (*System) Shutdown

func (r *System) Shutdown()

Jump to

Keyboard shortcuts

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