config

package
v1.3.0 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2020 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadEthereumConfig

func ReadEthereumConfig(filePath string) (ethereum.Config, error)

ReadEthereumConfig reads in the configuration file at `filePath` and returns its contained Ethereum config, or an error if something fails while reading the file.

This is the same as invoking ReadConfig and reading the Ethereum property from the returned config, but is available for external functions that expect to interact solely with Ethereum and are therefore independent of the rest of the config structure.

Types

type Config

type Config struct {
	Ethereum    ethereum.Config
	LibP2P      libp2p.Config
	Storage     Storage
	Metrics     Metrics
	Diagnostics Diagnostics
}

Config is the top level config structure.

var (
	// KeepOpts contains global application settings
	KeepOpts Config
)

func ReadConfig

func ReadConfig(filePath string) (*Config, error)

ReadConfig reads in the configuration file at `filePath` and returns the valid config stored there, or an error if something fails while reading the file or the config is invalid in a known way.

type Diagnostics added in v1.3.0

type Diagnostics struct {
	Port int
}

Diagnostics stores diagnostics-related configuration.

type Metrics added in v1.3.0

type Metrics struct {
	Port                int
	NetworkMetricsTick  int
	EthereumMetricsTick int
}

Metrics stores meta-info about metrics.

type Storage

type Storage struct {
	DataDir string
}

Storage stores meta-info about keeping data on disk

Jump to

Keyboard shortcuts

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