Documentation ¶
Overview ¶
Package localconf record all the values of the local config options.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // FindNewBlockChainNotifyC is the chan for finding new block chain configs. FindNewBlockChainNotifyC = make(chan string) // ChainMakerConfig is the CMConfig instance for global. ChainMakerConfig = &CMConfig{StorageConfig: map[string]interface{}{}} )
View Source
var (
//ConfigFilepath 配置文件的路径,默认为当前文件夹的chainmaker.yml文件
ConfigFilepath = "./chainmaker.yml"
)
Functions ¶
func InitLocalConfig ¶
InitLocalConfig init local config.
func RefreshLogLevelsConfig ¶
func RefreshLogLevelsConfig() error
RefreshLogLevelsConfig refresh the levels of the loggers with the logger config file.
func UpdateDebugConfig ¶
func UpdateDebugConfig(pairs []*config.ConfigKeyValue) error
UpdateDebugConfig refresh the switches of the debug mode.
Types ¶
type CMConfig ¶
type CMConfig struct { AuthType string `mapstructure:"auth_type"` LogConfig logger.LogConfig `mapstructure:"log"` NetConfig netConfig `mapstructure:"net"` NodeConfig nodeConfig `mapstructure:"node"` RpcConfig rpcConfig `mapstructure:"rpc"` BlockChainConfig []BlockchainConfig `mapstructure:"blockchain"` ConsensusConfig ConsensusConfig `mapstructure:"consensus"` StorageConfig map[string]interface{} `mapstructure:"storage"` TxPoolConfig map[string]interface{} `mapstructure:"txpool"` SyncConfig syncConfig `mapstructure:"sync"` VMConfig map[string]interface{} `mapstructure:"vm"` // 开发调试使用 DebugConfig debugConfig `mapstructure:"debug"` PProfConfig pprofConfig `mapstructure:"pprof"` MonitorConfig monitorConfig `mapstructure:"monitor"` CoreConfig coreConfig `mapstructure:"core"` SchedulerConfig schedulerConfig `mapstructure:"scheduler"` // contains filtered or unexported fields }
CMConfig - Local config struct
func (*CMConfig) GetBlockChains ¶
func (c *CMConfig) GetBlockChains() []BlockchainConfig
GetBlockChains - get blockchain config list
func (*CMConfig) PrettyJson ¶
PrettyJson print with json.
type ConsensusConfig ¶
type ConsensusConfig struct {
RaftConfig raftConfig `mapstructure:"raft"`
}
Click to show internal directories.
Click to hide internal directories.