mirror of
https://github.com/fhmq/hmq.git
synced 2026-05-02 06:18:33 +00:00
Plugins support (#46)
* modify * update * add acl * add feature * update dockerfile * add deploy * update * update * plugins * plugins * update * update * update * fixed * remove * fixed * add log * update * fixed * update * fix config * add http api * add http api * resp * add config for work chan * update * fixed * update * disable trace * fixed * change acl * fixed * fixed res * dd * dd * ddd * dd * update * fixed * update * add * fixed * update key * add log * update * format * update * update auth * update * update readme * added * update * fixed * fixed * fix * upade * update * update
This commit is contained in:
@@ -30,7 +30,8 @@ type Config struct {
|
||||
TlsInfo TLSInfo `json:"tlsInfo"`
|
||||
Acl bool `json:"acl"`
|
||||
AclConf string `json:"aclConf"`
|
||||
Debug bool `json:"-"`
|
||||
Debug bool `json:"debug"`
|
||||
Plugins []string `json:"plugins"`
|
||||
}
|
||||
|
||||
type RouteInfo struct {
|
||||
@@ -108,9 +109,6 @@ func ConfigureConfig(args []string) (*Config, error) {
|
||||
}
|
||||
})
|
||||
|
||||
logger.InitLogger(config.Debug)
|
||||
log = logger.Get().Named("Broker")
|
||||
|
||||
if configFile != "" {
|
||||
tmpConfig, e := LoadConfig(configFile)
|
||||
if e != nil {
|
||||
@@ -120,6 +118,9 @@ func ConfigureConfig(args []string) (*Config, error) {
|
||||
}
|
||||
}
|
||||
|
||||
logger.InitLogger(config.Debug)
|
||||
log = logger.Get().Named("Broker")
|
||||
|
||||
if err := config.check(); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
@@ -132,7 +133,7 @@ func LoadConfig(filename string) (*Config, error) {
|
||||
|
||||
content, err := ioutil.ReadFile(filename)
|
||||
if err != nil {
|
||||
log.Error("Read config file error: ", zap.Error(err))
|
||||
// log.Error("Read config file error: ", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
// log.Info(string(content))
|
||||
@@ -140,7 +141,7 @@ func LoadConfig(filename string) (*Config, error) {
|
||||
var config Config
|
||||
err = json.Unmarshal(content, &config)
|
||||
if err != nil {
|
||||
log.Error("Unmarshal config file error: ", zap.Error(err))
|
||||
// log.Error("Unmarshal config file error: ", zap.Error(err))
|
||||
return nil, err
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user