config

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const PasswordEnvVariable = "KEEP_ETHEREUM_PASSWORD" // #nosec G101 -- it's just env variable name

PasswordEnvVariable environment variable name for ethereum key password.

Variables

This section is empty.

Functions

func ReadCeloConfig added in v1.8.0

func ReadCeloConfig(filePath string) (celo.Config, error)

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

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

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
	Celo                   celo.Config
	SanctionedApplications SanctionedApplications
	Storage                Storage
	LibP2P                 libp2p.Config
	Client                 client.Config
	TSS                    tss.Config
	Metrics                Metrics
	Diagnostics            Diagnostics
	Extensions             Extensions
}

Config is the top level config structure.

func ReadConfig

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

ReadConfig reads in the configuration file in .toml format. Chain key file password is expected to be provided as environment variable.

type Diagnostics

type Diagnostics struct {
	Port int
}

Diagnostics stores diagnostics-related configuration.

type Extensions

type Extensions struct {
	TBTC tbtc.Config
}

Extensions stores app-specific extensions configuration.

type Metrics

type Metrics struct {
	Port                int
	NetworkMetricsTick  int
	EthereumMetricsTick int
	ClientMetricsTick   int
}

Metrics stores meta-info about metrics.

type SanctionedApplications

type SanctionedApplications struct {
	AddressesStrings []string `toml:"Addresses"`
}

SanctionedApplications contains addresses of applications approved by the operator.

func (*SanctionedApplications) Addresses

func (sa *SanctionedApplications) Addresses() ([]common.Address, error)

Addresses returns list of sanctioned applications as a slice of ethereum addresses.

type Storage

type Storage struct {
	DataDir string
}

Storage stores meta-info about keeping data on disk

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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