app

package
v0.1.10 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2024 License: GPL-3.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitChainCursor added in v0.1.4

func InitChainCursor(ctx context.Context, entCl *ent.Client, chain netconf.Chain) (uint64, uint64, error)

InitChainCursor return the initial cursor height to start streaming from (inclusive). If a cursor exists, it returns the cursor height + 1. Else a new cursor is created with chain deploy height.

func InsertBlockTX added in v0.1.3

func InsertBlockTX(ctx context.Context, tx *ent.Tx, block xchain.Block) error

InsertBlockTX inserts the block as part of a tx and commits it. The caller should handle rollback on any error.

func Run

func Run(ctx context.Context, cfg Config) error

func WriteConfigTOML

func WriteConfigTOML(cfg Config, logCfg log.Config, path string) error

WriteConfigTOML writes the toml indexer config to disk.

Types

type Config

type Config struct {
	RPCEndpoints   xchain.RPCEndpoints
	Network        netconf.ID
	ExplorerDBConn string
	MonitoringAddr string
}

func DefaultConfig

func DefaultConfig() Config

Jump to

Keyboard shortcuts

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