indexer

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: GPL-3.0, Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func StartApplication

func StartApplication(ctx context.Context, config ApplicationConfig, logger log.Logger) error

Types

type Application

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

func NewApplication

func NewApplication(config ApplicationConfig, logger log.Logger) *Application

func (*Application) Init

func (app *Application) Init(ctx context.Context) error

Init initializes the application and all its dependencies

func (*Application) RunIndexer

func (app *Application) RunIndexer(ctx context.Context) error

func (*Application) RunQueryServerGRPC

func (app *Application) RunQueryServerGRPC(ctx context.Context) error

func (*Application) RunQueryServerGRPCGateway

func (app *Application) RunQueryServerGRPCGateway(ctx context.Context) error

type ApplicationConfig

type ApplicationConfig struct {
	// EvmRpc is the URL of the EVM RPC. Must be a WebSocket URL.
	EvmRpc string

	// DbPath is the path to the database folder
	DbPath string

	// DbBackend Database backend: goleveldb | cleveldb | boltdb | rocksdb
	// * goleveldb (github.com/syndtr/goleveldb - most popular implementation)
	//   - pure go
	//   - stable
	// * cleveldb (uses levigo wrapper)
	//   - fast
	//   - requires gcc
	//   - use cleveldb build tag (go build -tags cleveldb)
	// * boltdb (uses etcd's fork of bolt - github.com/etcd-io/bbolt)
	//   - EXPERIMENTAL
	//   - may be faster is some use-cases (random reads - indexer)
	//   - use boltdb build tag (go build -tags boltdb)
	// * rocksdb (uses github.com/tecbot/gorocksdb)
	//   - EXPERIMENTAL
	//   - requires gcc
	//   - use rocksdb build tag (go build -tags rocksdb)
	// * badgerdb (uses github.com/dgraph-io/badger)
	//   - EXPERIMENTAL
	//   - use badgerdb build tag (go build -tags badgerdb)
	DbBackend db.BackendType

	// Jobs is a list of jobs that should be applied to the indexer
	ZkCertificateRegistry []common.Address

	// QueryServer is the configuration for the query server
	QueryServer QueryServerConfig

	// IndexerConfig is the configuration for the indexer
	IndexerConfig indexer.Config
}

type QueryServerConfig

type QueryServerConfig struct {
	GRPC struct {
		Address string
	}
	GRPCGateway struct {
		Address string
	}
}

Jump to

Keyboard shortcuts

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