config

package
v0.7.1-0...-3a62bcc Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIConfig

type APIConfig struct {
	Host string
	Port int
}

APIConfig configures the API server

type ChainConfig

type ChainConfig struct {
	// Configure known chains with the l2 chain id
	Preset int
}

ChainConfig configures of the chain being indexed

type Config

type Config struct {
	Chain   ChainConfig
	RPCs    RPCsConfig `toml:"rpcs"`
	DB      DBConfig
	API     APIConfig
	Metrics MetricsConfig
}

Config represents the `indexer.toml` file used to configure the indexer

func LoadConfig

func LoadConfig(path string) (Config, error)

LoadConfig loads the `indexer.toml` config file from a given path

type DBConfig

type DBConfig struct {
	Host     string
	Port     int
	User     string
	Password string
}

DBConfig configures the postgres database

type MetricsConfig

type MetricsConfig struct {
	Host string
	Port int
}

MetricsConfig configures the metrics server

type RPCsConfig

type RPCsConfig struct {
	L1RPC string `toml:"l1-rpc"`
	L2RPC string `toml:"l2-rpc"`
}

RPCsConfig configures the RPC urls

Jump to

Keyboard shortcuts

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