Documentation
¶
Index ¶
Constants ¶
View Source
const EnvPrefix = "SYG"
Variables ¶
View Source
var ( // Flags for running the app ConfigFlagName = "config" KeystoreFlagName = "keystore" BlockstoreFlagName = "blockstore" FreshStartFlagName = "fresh" LatestBlockFlagName = "latest" )
Functions ¶
Types ¶
type Config ¶
type Config struct {
RelayerConfig relayer.RelayerConfig
ChainConfigs []map[string]interface{}
}
func GetConfigFromENV ¶
GetConfigFromENV reads config from Env variables, validates it and parses it into config suitable for application
Properties of RelayerConfig are expected to be defined as separate Env variables where Env variable name reflects properties position in structure. Each Env variable needs to be prefixed with SYG.
For example, if you want to set Config.RelayerConfig.MpcConfig.Port this would translate to Env variable named SYG_RELAYER_MPCCONFIG_PORT.
func GetConfigFromFile ¶
GetConfigFromFile reads config from file, validates it and parses it into config suitable for application
func GetSharedConfigFromNetwork ¶
GetSharedConfigFromNetwork fetches shared configuration from URL and parses it.
type RawConfig ¶
type RawConfig struct {
RelayerConfig relayer.RawRelayerConfig `mapstructure:"relayer" json:"relayer"`
ChainConfigs []map[string]interface{} `mapstructure:"domains" json:"domains"`
}
Click to show internal directories.
Click to hide internal directories.