config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	KeyDataDir     = "data-dir"
	KeyClustersDir = "clusters-dir"
	KeyConfigFile  = "config-file"
	KeyBeaconNode  = "beacon-node"
	KeyLogLevel    = "log-level"
	KeyAPI         = "api"
	KeyVerbose     = "verbose"
	KeyValidators  = "validators"
)

Common config keys.

View Source
const (
	KeyDiscV5  = "discv5"
	KeyP2P     = "p2p"
	KeyNodeDB  = "nodedb"
	KeyNetlist = "netlist"
)

P2P config keys.

Variables

View Source
var StartTime = time.Now()

StartTime is the time at which the application was started.

Functions

func CommonFlags

func CommonFlags(flags *pflag.FlagSet)

CommonFlags sets up Charon's common flags.

Must only be called once in the program's lifetime.

func LoadViper

func LoadViper(configPath string) error

LoadViper loads additional config keys from the config file and environment.

func MustBindPFlag

func MustBindPFlag(key string, flags *pflag.FlagSet)

MustBindPFlag binds the flag in the given flag set to the viper key of the same name.

Panics if binding fails.

func P2PFlags

func P2PFlags(flags *pflag.FlagSet)

P2PFlags sets up Charon's p2p-related flags.

Must only be called once in the program's lifetime.

Types

This section is empty.

Jump to

Keyboard shortcuts

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