Documentation ¶
Index ¶
Constants ¶
View Source
const ( DBDialectMysql = "mysql" DBDialectSqlite3 = "sqlite3" LocalConfig = "local" AWSConfig = "aws" KeyTypeLocalPrivateKey = "local_private_key" KeyTypeAWSPrivateKey = "aws_private_key" KeyTypeMnemonic = "local_mnemonic" KeyTypeAWSMnemonic = "aws_mnemonic" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminConfig ¶
type AdminConfig struct {
ListenAddr string `json:"listen_addr"`
}
func (*AdminConfig) Validate ¶
func (cfg *AdminConfig) Validate()
type AlertConfig ¶
type AlertConfig struct { EnableAlert bool `json:"enable_alert"` EnableHeartBeat bool `json:"enable_heart_beat"` Interval int64 `json:"interval"` Identity string `json:"identity"` TelegramBotId string `json:"telegram_bot_id"` TelegramChatId string `json:"telegram_chat_id"` BalanceThreshold string `json:"balance_threshold"` SequenceGapThreshold uint64 `json:"sequence_gap_threshold"` }
func (*AlertConfig) Validate ¶
func (cfg *AlertConfig) Validate()
type BBCConfig ¶
type BBCConfig struct { RpcAddrs []string `json:"rpc_addrs"` MnemonicType string `json:"mnemonic_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` Mnemonic string `json:"mnemonic"` SleepMillisecondForWaitBlock int64 `json:"sleep_millisecond_for_wait_block"` CleanUpBlockInterval uint64 `json:"clean_up_block_interval"` BlockIntervalForCleanUpUndeliveredPackages uint64 `json:"block_interval_for_clean_up_undelivered_packages"` BehindBlockThreshold uint64 `json:"behind_block_threshold"` }
type BSCConfig ¶
type BSCConfig struct { KeyType string `json:"key_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` PrivateKey string `json:"private_key"` Providers []string `json:"providers"` GasLimit uint64 `json:"gas_limit"` GasPrice uint64 `json:"gas_price"` UnconfirmedTxThreshold uint64 `json:"unconfirmed_tx_threshold"` MonitorDataSeedList []string `json:"monitor_data_seed_list"` }
type ChannelConfig ¶
type Config ¶
type Config struct { CrossChainConfig CrossChainConfig `json:"cross_chain_config"` BBCConfig BBCConfig `json:"bbc_config"` BSCConfig BSCConfig `json:"bsc_config"` LogConfig LogConfig `json:"log_config"` AdminConfig AdminConfig `json:"admin_config"` AlertConfig AlertConfig `json:"alert_config"` DBConfig DBConfig `json:"db_config"` }
func ParseConfigFromFile ¶
func ParseConfigFromJson ¶
type CrossChainConfig ¶
type CrossChainConfig struct { SourceChainID uint16 `json:"source_chain_id"` DestChainID uint16 `json:"dest_chain_id"` MonitorChannelList []uint8 `json:"monitor_channel_list"` CompetitionMode bool `json:"competition_mode"` }
func (*CrossChainConfig) Validate ¶
func (cfg *CrossChainConfig) Validate()
type LogConfig ¶
type LogConfig struct { Level string `json:"level"` Filename string `json:"filename"` MaxFileSizeInMB int `json:"max_file_size_in_mb"` MaxBackupsOfLogFiles int `json:"max_backups_of_log_files"` MaxAgeToRetainLogFilesInDays int `json:"max_age_to_retain_log_files_in_days"` UseConsoleLogger bool `json:"use_console_logger"` UseFileLogger bool `json:"use_file_logger"` Compress bool `json:"compress"` }
Click to show internal directories.
Click to hide internal directories.