prehistory

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2024 License: CC0-1.0 Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	IndexFromPrehistory bool   `mapstructure:"indexFromPrehistory"`
	PrehistoryHeight    uint64 `mapstructure:"prehistoryHeight"`
	From                uint64 `mapstructure:"from"`
	To                  uint64 `mapstructure:"to"`
	ArchiveURL          string `mapstructure:"archiveURL"`
	BatchSize           uint64 `mapstructure:"batchSize"`
	PrehistoryChainId   uint64 `mapstructure:"prehistoryChainId"`
}

func GetConfig

func GetConfig() *Config

type Indexer

type Indexer struct {
	Config *Config
	// contains filtered or unexported fields
}

func New

func New(dbh db.Handler) (*Indexer, error)

New creates the prehistory indexer, the db.Handler should not be nil and configuration file prehistory part should be properly set

func (*Indexer) Close

func (i *Indexer) Close()

Close gracefully stops the prehistory indexer

func (*Indexer) Start

func (i *Indexer) Start()

Start starts the prehistory indexing as a goroutine based on the config file settings

type PreHistoryReader

type PreHistoryReader struct {
	// contains filtered or unexported fields
}

Jump to

Keyboard shortcuts

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