global

package
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 3, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

description: sync_eth

@author: xwc1125 @date: 2020/10/05

description: sync_eth

@author: xwc1125 @date: 2020/10/05

@author: xwc1125 @date: 2020/10/05

Index

Constants

This section is empty.

Variables

View Source
var (
	RootCli          *cli.Cli
	Config           *YamlConfig
	LevelDb          *leveldb.Database
	RpcClient        *chain.Eth
	RabbitMqTxRaw    *mq.Wrapper
	RabbitMqTxNotify *mq.Wrapper
)

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Name        string `json:"name" mapstructure:"name"`
	Version     string `json:"version" mapstructure:"version"`
	Description string `json:"description" mapstructure:"description"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Master  db_xorm.MysqlConfig `json:"master" mapstructure:"master"`
	Es      *EsConfig           `json:"es" mapstructure:"es"`
	LevelDb *LevelDbConfig      `json:"levelDb" mapstructure:"levelDb"`
	Mq      *mq.Config          `json:"mq" mapstructure:"mq"`
}

type EsConfig

type EsConfig struct {
	Host []string `json:"host" mapstructure:"host"`
}

type EthChainConfig

type EthChainConfig struct {
	ChainName        string             `json:"chainName" mapstructure:"chainName"`
	ChainType        int64              `json:"chainType" mapstructure:"chainType"`
	Host             string             `json:"host" mapstructure:"host"`
	ChainId          int64              `json:"chainId" mapstructure:"chainId"`
	ClientIdentifier string             `json:"clientIdentifier" mapstructure:"clientIdentifier"`
	IsEip155         bool               `json:"isEip155" mapstructure:"isEip155"`
	GasPrice         uint64             `json:"gasPrice" mapstructure:"gasPrice"`
	Gas              uint64             `json:"ga" mapstructure:"gas"`
	To               string             `json:"to" mapstructure:"to"`
	Contract         string             `json:"contract" mapstructure:"contract"`
	Value            uint64             `json:"value" mapstructure:"value"`
	Input            string             `json:"input" mapstructure:"input"`
	Alloc            types.GenesisAlloc `json:"alloc" mapstructure:"alloc"`
	BaseDecimals     int32              `json:"baseDecimals" mapstructure:"baseDecimals"`
	MinConfirms      uint64             `json:"minConfirms" mapstructure:"minConfirms"`       // the mini confirms
	SyncStartBlock   int64              `json:"syncStartBlock" mapstructure:"syncStartBlock"` // start sync block
}

type LevelDbConfig

type LevelDbConfig struct {
	Path string `json:"path" mapstructure:"path"`
}

LevelDb config

type LogConfig

type LogConfig struct {
	Modules  string `json:"modules" mapstructure:"modules"`
	FilePath string `json:"file_path" mapstructure:"file_path"`
	FileName string `json:"file_name" mapstructure:"file_name"`
	Format   string `json:"format" mapstructure:"format"`
	Console  bool   `json:"console" mapstructure:"console"`
	Level    int    `json:"level" mapstructure:"level"`
	UseColor bool   `json:"use_color" mapstructure:"use_color"`
}

func (*LogConfig) GetModules

func (c *LogConfig) GetModules() []string

type ServerConfig

type ServerConfig struct {
	BaseUrl string `json:"baseUrl" mapstructure:"baseUrl"`
	Addr    string `json:"addr" mapstructure:"addr"`
	Port    int    `json:"port" mapstructure:"port"`
}

type YamlConfig

type YamlConfig struct {
	Server      *ServerConfig   `json:"server" mapstructure:"server"`
	App         *AppConfig      `json:"app" mapstructure:"app"`
	Log         *LogConfig      `json:"log" mapstructure:"log"`
	Database    *DatabaseConfig `json:"database" mapstructure:"database"`
	ChainConfig *EthChainConfig `json:"chainConfig" mapstructure:"chainConfig"`
}

func (*YamlConfig) GetApp

func (c *YamlConfig) GetApp() *AppConfig

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL