浏览代码

fetches mq admin password from env

Abhishek Kondur 3 年之前
父节点
当前提交
bf317d05eb
共有 1 个文件被更改,包括 10 次插入0 次删除
  1. 10 0
      servercfg/serverconf.go

+ 10 - 0
servercfg/serverconf.go

@@ -600,3 +600,13 @@ func GetMQServerPort() string {
 	}
 	}
 	return port
 	return port
 }
 }
+
+func GetMqAdminPassword() string {
+	password := ""
+	if os.Getenv("MQ_ADMIN_PASSWORD") != "" {
+		password = os.Getenv("MQ_ADMIN_PASSWORD")
+	} else if config.Config.Server.MQAdminPassword != "" {
+		password = config.Config.Server.MQAdminPassword
+	}
+	return password
+}