parse

package
v0.0.0-...-2adbdf0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2022 License: CC0-1.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseCmd

func ParseCmd(cmdCfg *cmdtypes.Config) *cobra.Command

ParseCmd returns the command that should be run when we want to start parsing a chain state.

func StartParsing

func StartParsing(ctx *Context) error

StartParsing represents the function that should be called when the parse command is executed

Types

type Config

type Config interface {
	GetRegistrar() registrar.Registrar
	GetConfigParser() types.ConfigParser
	GetDBBuilder() db.Builder
	GetLogger() logging.Logger
}

Config contains all the configuration for the "parse" command

type Context

type Context struct {
	GlobalCfg types.Config
	Proxy     client.ClientProxy
	Database  db.Database
	Logger    logging.Logger
	Modules   []modules.Module
	Pool      pool.Pool
	SlotQueue types.SlotQueue
}

Context contains the parsing context

func GetParsingContext

func GetParsingContext(config Config) (*Context, error)

GetParsingContext setups all the things that should be later passed to StartParsing in order to parse the chain data properly.

func NewContext

func NewContext(
	globalCfg types.Config, proxy client.ClientProxy, db db.Database,
	logger logging.Logger, modules []modules.Module,
	pool pool.Pool, slotQueue types.SlotQueue,
) *Context

NewContext builds a new Context instance

Jump to

Keyboard shortcuts

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