Documentation ¶
Index ¶
- func GetConfig(config *Config, path string) error
- func GetLoggerFor(ctx string) *log.Entry
- func InitLogger(level string)
- type Client
- type Config
- type ConsensusMessage
- type ConsensusMessageHandler
- type CryptoTransfer
- type CryptoTransferHandler
- type Db
- type Ethereum
- type Handler
- type Hedera
- type ID
- type MirrorNode
- type Operator
- type Recovery
- type Validator
- type Watcher
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetLoggerFor ¶
GetLoggerFor returns a logger defined with a context
func InitLogger ¶
func InitLogger(level string)
InitLogger sets the initial configuration of the used logger
Types ¶
type Config ¶
type Config struct {
Hedera Hedera `yaml:"hedera"`
}
func LoadConfig ¶
func LoadConfig() Config
type ConsensusMessage ¶
type ConsensusMessage struct {
Topic ID `yaml:"topic" env:"HEDERA_ETH_BRIDGE_WATCHER_CONSENSUS_MESSAGE"`
}
type ConsensusMessageHandler ¶
type CryptoTransfer ¶
type CryptoTransfer struct {
Account ID `yaml:"account" env:"HEDERA_ETH_BRIDGE_WATCHER_CRYPTO_TRANSFER"`
}
type CryptoTransferHandler ¶
type Db ¶
type Db struct { Host string `yaml:"host" env:"HEDERA_ETH_BRIDGE_VALIDATOR_DB_HOST"` Name string `yaml:"name" env:"HEDERA_ETH_BRIDGE_VALIDATOR_DB_NAME"` Password string `yaml:"password" env:"HEDERA_ETH_BRIDGE_VALIDATOR_DB_PASSWORD"` Port string `yaml:"port" env:"HEDERA_ETH_BRIDGE_VALIDATOR_DB_PORT"` Username string `yaml:"username" env:"HEDERA_ETH_BRIDGE_VALIDATOR_DB_USERNAME"` }
type Ethereum ¶
type Ethereum struct { NodeUrl string `yaml:"node_url" env:"HEDERA_ETH_BRIDGE_ETH_NODE_URL"` RouterContractAddress string `yaml:"router_contract_address" env:"HEDERA_ETH_BRIDGE_ETH_ROUTER_CONTRACT_ADDRESS"` BlockConfirmations uint64 `yaml:"block_confirmations" env:"HEDERA_ETH_BLOCK_CONFIRMATIONS"` }
type Handler ¶
type Handler struct { CryptoTransfer CryptoTransferHandler `yaml:"crypto-transfer"` ConsensusMessage ConsensusMessageHandler `yaml:"consensus-message"` }
type Hedera ¶
type Hedera struct { LogLevel string `yaml:"log_level"` Validator Validator `yaml:"validator"` Eth Ethereum `yaml:"eth"` MirrorNode MirrorNode `yaml:"mirror_node"` Client Client `yaml:"client"` Watcher Watcher `yaml:"watcher"` Handler Handler `yaml:"handler"` Recovery Recovery `yaml:"recovery"` RestApiOnly bool `yaml:"rest_api_only"` }
type MirrorNode ¶
type MirrorNode struct { ClientAddress string `yaml:"client_address" env:"HEDERA_ETH_BRIDGE_MIRROR_NODE_CLIENT_ADDRESS"` ApiAddress string `yaml:"api_address" env:"HEDERA_ETH_BRIDGE_MIRROR_NODE_API_ADDRESS"` PollingInterval time.Duration `yaml:"polling_interval" env:"HEDERA_ETH_BRIDGE_MIRROR_NODE_POLLING_INTERVAL"` }
type Operator ¶
type Operator struct { AccountId string `yaml:"account_id" env:"HEDERA_ETH_BRIDGE_CLIENT_OPERATOR_ACCOUNT_ID"` EthPrivateKey string `yaml:"eth_private_key" env:"HEDERA_ETH_BRIDGE_CLIENT_OPERATOR_ETH_PRIVATE_KEY"` PrivateKey string `yaml:"private_key" env:"HEDERA_ETH_BRIDGE_CLIENT_OPERATOR_PRIVATE_KEY"` }
type Recovery ¶
type Recovery struct {
Timestamp int64 `yaml:"timestamp" env:"HEDERA_ETH_BRIDGE_VALIDATOR_RECOVERY_TIMESTAMP"`
}
type Watcher ¶
type Watcher struct { CryptoTransfer CryptoTransfer `yaml:"crypto-transfer"` ConsensusMessage ConsensusMessage `yaml:"consensus-message"` }
Click to show internal directories.
Click to hide internal directories.