Documentation
¶
Index ¶
- func DecodeConfigInputWrapperTOML(data []byte, cw *ConfigInputWrapper) error
- func LoadChainConfig(cfgPath string) (chains.ChainProviderConfig, error)
- func ParseChainProviderConfig(w ChainProviderConfigWrapper) (chains.ChainProviderConfig, error)
- type ChainProviderConfigWrapper
- type ChainProviderConfigs
- type Config
- type ConfigInputWrapper
- type GlobalConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeConfigInputWrapperTOML ¶
func DecodeConfigInputWrapperTOML(data []byte, cw *ConfigInputWrapper) error
DecodeConfigInputWrapperTOML decodes a TOML bytes into a ConfigInputWrapper object.
func LoadChainConfig ¶
func LoadChainConfig(cfgPath string) (chains.ChainProviderConfig, error)
LoadChainConfig reads chain config file from given path and return chain config object
func ParseChainProviderConfig ¶
func ParseChainProviderConfig(w ChainProviderConfigWrapper) (chains.ChainProviderConfig, error)
ParseChainProviderConfig converts a TOMLWrapper object to a ChainProviderConfig object.
Types ¶
type ChainProviderConfigWrapper ¶
type ChainProviderConfigWrapper map[string]interface{}
ChainProviderConfigWrapper is an intermediary type for parsing any object from config.toml file
type ChainProviderConfigs ¶
type ChainProviderConfigs map[string]chains.ChainProviderConfig
ChainProviderConfigs is a collection of ChainProviderConfig interfaces (mapped by chainName)
type Config ¶
type Config struct {
Global GlobalConfig `mapstructure:"global" toml:"global"`
BandChain band.Config `mapstructure:"bandchain" toml:"bandchain"`
TargetChains ChainProviderConfigs `mapstructure:"target_chains" toml:"target_chains"`
}
Config defines the configuration for the falcon tunnel relayer.
func ParseConfig ¶
func ParseConfigInputWrapper ¶
func ParseConfigInputWrapper(wrappedCfg *ConfigInputWrapper) (*Config, error)
ParseConfigInputWrapper converts a ConfigInputWrapper object to a Config object.
type ConfigInputWrapper ¶
type ConfigInputWrapper struct {
Global GlobalConfig `mapstructure:"global"`
BandChain band.Config `mapstructure:"bandchain"`
TargetChains map[string]ChainProviderConfigWrapper `mapstructure:"target_chains"`
}
ConfigInputWrapper is an intermediary type for parsing the config.toml file
type GlobalConfig ¶
type GlobalConfig struct {
LogLevel string `mapstructure:"log_level" toml:"log_level"`
CheckingPacketInterval time.Duration `mapstructure:"checking_packet_interval" toml:"checking_packet_interval"`
SyncTunnelsInterval time.Duration `mapstructure:"sync_tunnels_interval" toml:"sync_tunnels_interval"`
PenaltySkipRounds uint `mapstructure:"penalty_skip_rounds" toml:"penalty_skip_rounds"`
MetricsListenAddr string `mapstructure:"metrics_listen_addr" toml:"metrics_listen_addr"`
}
GlobalConfig is the global configuration for the falcon tunnel relayer