tracker

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Mar 6, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	NoReturnLimit = 0
	WipStr        = "_wip"
)

Variables

This section is empty.

Functions

func ClearInProgress

func ClearInProgress(id string, db *gorm.DB) error

func GetMissingHeights

func GetMissingHeights(chainTip uint64, genesisHeight uint64, limit uint64, id string, db *gorm.DB) (*[]uint64, error)

func GetTrackedHeights

func GetTrackedHeights(id string, db *gorm.DB) (*[]uint64, error)

func GetTrackedTip

func GetTrackedTip(db *gorm.DB, refTrackId string) (uint64, error)

func RemoveHeights

func RemoveHeights(heights *[]uint64, id string, db *gorm.DB) error

func RemoveSectionsFromTracker

func RemoveSectionsFromTracker(toRemove Sections, id string, db *gorm.DB) error

func UpdateAndRemoveWipHeights

func UpdateAndRemoveWipHeights(heights *[]uint64, id string, dbConn *gorm.DB) error

func UpdateInProgressHeight

func UpdateInProgressHeight(track bool, heights *[]uint64, id string, db *gorm.DB) error

func UpdateTrackedHeights

func UpdateTrackedHeights(heights *[]uint64, id string, db *gorm.DB) error

Types

type DbSection

type DbSection struct {
	Section
	IndexerId string
}

type DbSections

type DbSections = []DbSection

type Section

type Section struct {
	StartIdx uint64
	EndIdx   uint64
}

Section defines an interval of heights with inclusive boundaries [StartIdx, EndIdx]

func (Section) TableName

func (Section) TableName() string

type SectionId

type SectionId struct {
	Sections
	IndexerId string
}

type Sections

type Sections = []Section

func RemoveSections

func RemoveSections(sections, toRemove Sections) Sections

RemoveSections removes any sections included in (toRemove: Sections) that intersect with (sections: Sections)

Jump to

Keyboard shortcuts

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