Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
HomePath = ""
)
Functions ¶
func GetAvgBlockTime ¶
GetAvgBlockTime returns the average_block_time in the configuration file or returns 3 seconds if it is not configured
func GetConfigFilePath ¶
func GetConfigFilePath() string
GetConfigFilePath returns the path to the configuration file given the executable name
Types ¶
type ChainConfig ¶
type ChainConfig struct { Bech32Prefix string `yaml:"bech32_prefix"` Modules []string `yaml:"modules"` }
func DefaultChainConfig ¶
func DefaultChainConfig() ChainConfig
DefaultChainConfig returns the default instance of ChainConfig
func NewChainConfig ¶
func NewChainConfig(bech32Prefix string, modules []string) ChainConfig
NewChainConfig returns a new ChainConfig instance
func (ChainConfig) IsModuleEnabled ¶
func (cfg ChainConfig) IsModuleEnabled(moduleName string) bool
type Config ¶
type Config struct { Chain ChainConfig `yaml:"chain"` Node nodeconfig.Config `yaml:"node"` Parser parserconfig.Config `yaml:"parsing"` Database databaseconfig.Config `yaml:"database"` Logging loggingconfig.Config `yaml:"logging"` // contains filtered or unexported fields }
Config defines all necessary juno configuration parameters.
var ( // Cfg represents the configuration to be used during the execution Cfg Config )
func DefaultConfig ¶
func DefaultConfig() Config
func DefaultConfigParser ¶
DefaultConfigParser attempts to read and parse a Juno config from the given string bytes. An error reading or parsing the config results in a panic.
func NewConfig ¶
func NewConfig( nodeCfg nodeconfig.Config, chainCfg ChainConfig, dbConfig databaseconfig.Config, parserConfig parserconfig.Config, loggingConfig loggingconfig.Config, ) Config
NewConfig builds a new Config instance
Click to show internal directories.
Click to hide internal directories.