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 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 BTCConfig ¶
type BTCConfig struct { RpcAddrs []BTCRpcAddrs `json:"rpc_addrs"` SleepSecond uint64 `json:"sleep_second"` DataSeedDenyServiceThreshold float64 `json:"data_seed_deny_service_threshold"` }
type BTCRpcAddrs ¶
type COREConfig ¶
type COREConfig struct { PrivateKey string `json:"private_key"` Providers []string `json:"providers"` GasLimit uint64 `json:"gas_limit"` GasPrice uint64 `json:"gas_price"` GasIncrease uint64 `json:"gas_increase"` SleepSecond uint64 `json:"sleep_second"` DataSeedDenyServiceThreshold float64 `json:"data_seed_deny_service_threshold"` }
func (*COREConfig) Validate ¶
func (cfg *COREConfig) Validate()
type Config ¶
type Config struct { CrossChainConfig CrossChainConfig `json:"cross_chain_config"` BTCConfig BTCConfig `json:"btc_config"` COREConfig COREConfig `json:"core_config"` LogConfig LogConfig `json:"log_config"` AlertConfig AlertConfig `json:"alert_config"` }
func ParseConfigFromFile ¶
func ParseConfigFromJson ¶
type CrossChainConfig ¶
type CrossChainConfig struct {
RecursionHeight int64 `json:"recursion_height"`
}
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.