Back to

Package reap

Latest Go to latest

The highest tagged major version is .

Published: Nov 23, 2017 | Licenses: Apache-2.0 , BSD-2-Clause-FreeBSD , BSD-3-Clause , MIT | Module:


Package reap contains the history reaping subsystem for horizon. 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.


type System

type System struct {
	HorizonDB      *db.Session
	RetentionCount uint
	// contains filtered or unexported fields

System represents the history reaping subsystem of horizon.

func New

func New(retention uint, horizon *db.Session) *System

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

func (*System) DeleteUnretainedHistory

func (r *System) DeleteUnretainedHistory() error

DeleteUnretainedHistory removes all data associated with unretained ledgers.

func (*System) Tick

func (r *System) Tick()

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

Package Files

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier