Documentation ¶
Index ¶
Constants ¶
View Source
const (
QlcConfigFile = "qlc.json"
)
Variables ¶
This section is empty.
Functions ¶
func DefaultConfigFile ¶
func DefaultConfigFile() string
func DefaultDataDir ¶
func DefaultDataDir() string
DefaultDataDir is the default data directory to use for the databases and other persistence requirements.
func QlcTestDataDir ¶
func QlcTestDataDir() string
Types ¶
type CfgMigrate ¶
type CfgMigrations ¶
type CfgMigrations []CfgMigrate
func (CfgMigrations) Len ¶
func (m CfgMigrations) Len() int
func (CfgMigrations) Less ¶
func (m CfgMigrations) Less(i, j int) bool
func (CfgMigrations) Swap ¶
func (m CfgMigrations) Swap(i, j int)
type Config ¶
type Config struct { Version int `json:"version"` DataDir string `json:"DataDir"` StorageMax string `json:"StorageMax"` Mode string `json:"mode"` // runtime mode: Test,Normal AutoGenerateReceive bool `json:"AutoGenerateReceive"` LogConfig *LogConfig `json:"log"` //log config RPC *RPCConfig `json:"rpc"` P2P *P2PConfig `json:"p2p"` Discovery *DiscoveryConfig `json:"Discovery"` ID *IdentityConfig `json:"Identity"` PerformanceTest *PerformanceTestConfig }
func DefaultConfig ¶
func (*Config) DecodePrivateKey ¶
DecodePrivateKey is a helper to decode the users PrivateKey
type ConfigManager ¶
type ConfigManager struct {
// contains filtered or unexported fields
}
func NewCfgManager ¶
func NewCfgManager(path string) *ConfigManager
func (*ConfigManager) Load ¶
func (c *ConfigManager) Load(migrations ...CfgMigrate) (*Config, error)
Load the config file and will create default if config file no exist
type DiscoveryConfig ¶
type IdentityConfig ¶
Identity tracks the configuration of the local node's identity.
type LogConfig ¶
type LogConfig struct { Level string `json:"level"` // log level: info,warn,debug OutputPaths []string `json:"outputPaths"` ErrorOutputPaths []string `json:"errorOutputPaths"` Encoding string `json:"encoding"` EncoderConfig struct { MessageKey string `json:"messageKey"` LevelKey string `json:"levelKey"` LevelEncoder string `json:"levelEncoder"` } `json:"encoderConfig"` }
type PerformanceTestConfig ¶ added in v0.0.9
type PerformanceTestConfig struct {
Enabled bool
}
type RPCConfig ¶
type RPCConfig struct { Enable bool `json:"enable"` //Listen string `json:"Listen"` HTTPEndpoint string `json:"hTTPEndpoint"` HTTPEnabled bool `json:"hTTPEnabled"` HTTPCors []string `json:"hTTPCors"` HttpVirtualHosts []string `json:"httpVirtualHosts"` WSEnabled bool `json:"wSEnabled"` WSEndpoint string `json:"wSEndpoint"` IPCEndpoint string `json:"iPCEndpoint"` IPCEnabled bool `json:"iPCEnabled"` }
Click to show internal directories.
Click to hide internal directories.