Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultLogLevel ¶
func DefaultLogLevel() string
func DefaultPackageLogLevels ¶
func DefaultPackageLogLevels() string
func EnsureRoot ¶
***** these are for production settings **********
Types ¶
type BaseConfig ¶
type BaseConfig struct { // The root directory for all data. // This should be set in viper so it can unmarshal into this struct RootDir string `mapstructure:"home"` // A JSON file containing the initial validator set and other meta data Genesis string `mapstructure:"genesis_file"` //The ID of the network to json ChainID string `mapstructure:"chain_id"` // A JSON file containing the private key to use as a validator in the consensus protocol PrivateKey string `mapstructure:"private_key"` // A custom human readable name for this node Moniker string `mapstructure:"moniker"` // Output level for logging LogLevel string `mapstructure:"log_level"` // TCP or UNIX socket address for the profiling server to listen on ProfListenAddress string `mapstructure:"prof_laddr"` // If this node is many blocks behind the tip of the chain, FastSync // allows them to catchup quickly by downloading blocks in parallel // and verifying their commits FastSync bool `mapstructure:"fast_sync"` FilterPeers bool `mapstructure:"filter_peers"` // false // What indexer to use for transactions TxIndex string `mapstructure:"tx_index"` // Database backend: leveldb | memdb DBBackend string `mapstructure:"db_backend"` // Database directory DBPath string `mapstructure:"db_dir"` // Keystore directory KeysPath string `mapstructure:"keys_dir"` // remote HSM url HsmUrl string `mapstructure:"hsm_url"` ApiAddress string `mapstructure:"api_addr"` Time time.Time }
func DefaultBaseConfig ¶
func DefaultBaseConfig() BaseConfig
func TestBaseConfig ¶
func TestBaseConfig() BaseConfig
func (BaseConfig) DBDir ¶
func (b BaseConfig) DBDir() string
func (BaseConfig) GenesisFile ¶
func (b BaseConfig) GenesisFile() string
func (BaseConfig) KeysDir ¶
func (b BaseConfig) KeysDir() string
type Config ¶
type Config struct { // Top level options use an anonymous struct BaseConfig `mapstructure:",squash"` // Options for services RPC *RPCConfig `mapstructure:"rpc"` P2P *P2PConfig `mapstructure:"p2p"` Wallet *WalletConfig `mapstructure:"wallet"` }
func DefaultConfig ¶
func DefaultConfig() *Config
func TestConfig ¶
func TestConfig() *Config
type P2PConfig ¶
type P2PConfig struct { RootDir string `mapstructure:"home"` ListenAddress string `mapstructure:"laddr"` Seeds string `mapstructure:"seeds"` SkipUPNP bool `mapstructure:"skip_upnp"` AddrBook string `mapstructure:"addr_book_file"` AddrBookStrict bool `mapstructure:"addr_book_strict"` PexReactor bool `mapstructure:"pex"` MaxNumPeers int `mapstructure:"max_num_peers"` }
func DefaultP2PConfig ¶
func DefaultP2PConfig() *P2PConfig
func TestP2PConfig ¶
func TestP2PConfig() *P2PConfig
func (*P2PConfig) AddrBookFile ¶
type RPCConfig ¶
type RPCConfig struct { RootDir string `mapstructure:"home"` // TCP or UNIX socket address for the RPC server to listen on ListenAddress string `mapstructure:"laddr"` // TCP or UNIX socket address for the gRPC server to listen on // NOTE: This server only supports /broadcast_tx_commit GRPCListenAddress string `mapstructure:"grpc_laddr"` // Activate unsafe RPC commands like /dial_seeds and /unsafe_flush_mempool Unsafe bool `mapstructure:"unsafe"` }
func DefaultRPCConfig ¶
func DefaultRPCConfig() *RPCConfig
func TestRPCConfig ¶
func TestRPCConfig() *RPCConfig
type WalletConfig ¶ added in v0.1.1
type WalletConfig struct {
Enable bool `mapstructure:"enable"`
}
func DefaultWalletConfig ¶ added in v0.1.1
func DefaultWalletConfig() *WalletConfig
func TestWalletConfig ¶ added in v0.1.1
func TestWalletConfig() *WalletConfig
Click to show internal directories.
Click to hide internal directories.