generator

package
v0.3.1-0...-684a909 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2024 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ZeroAddress = common.HexToAddress("0x0000000000000000000000000000000000000000")
)

Functions

func InitFromConfig

func InitFromConfig(ctx context.Context, g *Generator, cfg *Config) error

Types

type Config

type Config struct {
	// db configs
	DatabaseUsername        string
	DatabasePassword        string
	DatabaseName            string
	DatabaseHost            string
	DatabaseMaxIdleConns    uint64
	DatabaseMaxOpenConns    uint64
	DatabaseMaxConnLifetime uint64
	MetricsHTTPPort         uint64
	GenesisDate             time.Time
	Regenerate              bool
	OpenDBFunc              func() (db.DB, error)
}

func NewConfigFromCliContext

func NewConfigFromCliContext(c *cli.Context) (*Config, error)

NewConfigFromCliContext creates a new config instance from command line flags.

type Generator

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

Generator is a subcommand which is intended to be run on an interval, like a cronjob, to parse the indexed data from the database, and generate time series data that can easily be displayed via charting libraries.

func (*Generator) Close

func (g *Generator) Close(ctx context.Context)

func (*Generator) InitFromCli

func (g *Generator) InitFromCli(ctx context.Context, c *cli.Context) error

func (*Generator) Name

func (g *Generator) Name() string

func (*Generator) Start

func (g *Generator) Start() error

Jump to

Keyboard shortcuts

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