config: Initialize notify for fresh configs. (#2531)

master
Harshavardhana 8 years ago committed by GitHub
parent 4722c94653
commit 9dd0e3dc44
  1. 8
      cmd/config-v6.go

@ -55,6 +55,14 @@ func initConfig() error {
Enable: true, Enable: true,
Level: "fatal", Level: "fatal",
} }
// Make sure to initialize notification configs.
srvCfg.Notify.AMQP = make(map[string]amqpNotify)
srvCfg.Notify.AMQP["1"] = amqpNotify{}
srvCfg.Notify.ElasticSearch = make(map[string]elasticSearchNotify)
srvCfg.Notify.ElasticSearch["1"] = elasticSearchNotify{}
srvCfg.Notify.Redis = make(map[string]redisNotify)
srvCfg.Notify.Redis["1"] = redisNotify{}
srvCfg.rwMutex = &sync.RWMutex{} srvCfg.rwMutex = &sync.RWMutex{}
// Create config path. // Create config path.

Loading…
Cancel
Save