Documentation ¶
Index ¶
Constants ¶
View Source
const ( FlagHome = "home" FlagCertPath = "cert_path" FlagUseTLS = "use_tls" FlagRPCPort = "rpc_port" )
View Source
const DefaultConfigFile = "chaind.toml"
View Source
const DefaultHome = "~/.chaind"
Variables ¶
View Source
var ValidETHAPIs = sets.NewStringSet([]string{
"admin",
"db",
"debug",
"eth",
"miner",
"net",
"personal",
"shh",
"txpool",
"web3",
})
Functions ¶
func ValidateConfig ¶
Types ¶
type Backend ¶
type Backend struct { Type pkg.BackendType `mapstructure:"type"` URL string `mapstructure:"url"` Name string `mapstructure:"name"` Main bool `mapstructure:"main"` }
type Config ¶
type Config struct { Home string `mapstructure:"home"` CertPath string `mapstructure:"cert_path"` UseTLS bool `mapstructure:"use_tls"` EnablePrometheus bool `mapstructure:"enable_prometheus"` ETHConfig *ETH `mapstructure:"eth"` RPCPort int `mapstructure:"rpc_port"` LogLevel string `mapstructure:"log_level"` LogAuditorConfig *LogAuditorConfig `mapstructure:"log_auditor"` RedisConfig *RedisConfig `mapstructure:"redis"` Backends []Backend `mapstructure:"backend"` Master bool `mapstructure:"master"` }
func ReadConfig ¶
type LogAuditorConfig ¶
type LogAuditorConfig struct {
LogFile string `mapstructure:"log_file"`
}
type RedisConfig ¶
Click to show internal directories.
Click to hide internal directories.