Documentation ¶
Index ¶
Constants ¶
View Source
const ( FlagConfigPath = "config-path" FlagConfigType = "config-type" FlagConfigAwsRegion = "aws-region" FlagConfigAwsSecretKey = "aws-secret-key" FlagConfigPrivateKey = "private-key" FlagConfigBlsPrivateKey = "bls-private-key" FlagConfigDbPass = "db-pass" FlagConfigDbUsername = "db-username" DBDialectMysql = "mysql" DBDialectSqlite3 = "sqlite3" LocalConfig = "local" AWSConfig = "aws" KeyTypeLocalPrivateKey = "local_private_key" KeyTypeAWSPrivateKey = "aws_private_key" ConfigType = "CONFIG_TYPE" ConfigFilePath = "CONFIG_FILE_PATH" ConfigDBPass = "DB_PASSWORD" ConfigDBUserName = "DB_USERNAME" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AdminConfig ¶
type AdminConfig struct {
Port uint16 `json:"port"`
}
func (*AdminConfig) Validate ¶
func (cfg *AdminConfig) Validate()
type AlertConfig ¶
type BSCConfig ¶
type BSCConfig struct { OpBNB bool `json:"op_bnb"` KeyType string `json:"key_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` RPCAddrs []string `json:"rpc_addrs"` PrivateKey string `json:"private_key"` GasLimit uint64 `json:"gas_limit"` GasPrice uint64 `json:"gas_price"` NumberOfBlocksForFinality uint64 `json:"number_of_blocks_for_finality"` StartHeight uint64 `json:"start_height"` ChainId uint64 `json:"chain_id"` }
func (*BSCConfig) IsOpCrossChain ¶
type Config ¶
type Config struct { GreenfieldConfig GreenfieldConfig `json:"greenfield_config"` BSCConfig BSCConfig `json:"bsc_config"` RelayConfig RelayConfig `json:"relay_config"` VotePoolConfig VotePoolConfig `json:"vote_pool_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 DBConfig ¶
type DBConfig struct { Dialect string `json:"dialect"` KeyType string `json:"key_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` Password string `json:"password"` Username string `json:"username"` Url string `json:"url"` MaxIdleConns int `json:"max_idle_conns"` MaxOpenConns int `json:"max_open_conns"` }
type GreenfieldConfig ¶
type GreenfieldConfig struct { KeyType string `json:"key_type"` AWSRegion string `json:"aws_region"` AWSSecretName string `json:"aws_secret_name"` AWSBlsSecretName string `json:"aws_bls_secret_name"` RPCAddrs []string `json:"rpc_addrs"` PrivateKey string `json:"private_key"` BlsPrivateKey string `json:"bls_private_key"` ChainId uint64 `json:"chain_id"` StartHeight uint64 `json:"start_height"` MonitorChannelList []uint8 `json:"monitor_channel_list"` GasLimit int64 `json:"gas_limit"` FeeAmount int64 `json:"fee_amount"` ChainIdString string `json:"chain_id_string"` UseWebsocket bool `json:"use_websocket"` }
func (*GreenfieldConfig) Validate ¶
func (cfg *GreenfieldConfig) 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"` }
type RelayConfig ¶
type RelayConfig struct { BSCToGreenfieldInturnRelayerTimeout int64 `json:"bsc_to_greenfield_inturn_relayer_timeout"` // in second GreenfieldToBSCInturnRelayerTimeout int64 `json:"greenfield_to_bsc_inturn_relayer_timeout"` // in second GreenfieldSequenceUpdateLatency int64 `json:"greenfield_sequence_update_latency"` // in second BSCSequenceUpdateLatency int64 `json:"bsc_sequence_update_latency"` // in second CrossChainContractAddr string `json:"cross_chain_contract_addr"` GreenfieldLightClientContractAddr string `json:"greenfield_light_client_contract_addr"` RelayerHubContractAddr string `json:"relayer_hub_contract_addr"` SrcZkmeSBTContractAddr string `json:"src_zkmesbt_contract_addr"` }
func (*RelayConfig) Validate ¶
func (cfg *RelayConfig) Validate()
type VotePoolConfig ¶
type VotePoolConfig struct { BroadcastIntervalInMillisecond int64 `json:"broadcast_interval_in_millisecond"` VotesBatchMaxSizePerInterval int64 `json:"votes_batch_max_size_per_interval"` QueryIntervalInMillisecond int64 `json:"query_interval_in_millisecond"` }
func (*VotePoolConfig) Validate ¶
func (cfg *VotePoolConfig) Validate()
Click to show internal directories.
Click to hide internal directories.