Browse Source

fetches mq admin password from env

Abhishek Kondur 2 years ago
parent
commit
bf317d05eb
1 changed files with 10 additions and 0 deletions
  1. 10 0
      servercfg/serverconf.go

+ 10 - 0
servercfg/serverconf.go

@@ -600,3 +600,13 @@ func GetMQServerPort() string {
 	}
 	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
+}