|
@@ -97,6 +97,7 @@ func GetServerInfo() models.ServerConfig {
|
|
|
cfg.CoreDNSAddr = GetCoreDNSAddr()
|
|
|
cfg.APIPort = GetAPIPort()
|
|
|
cfg.DNSMode = "off"
|
|
|
+ cfg.Broker = GetPublicBrokerEndpoint()
|
|
|
if IsDNSMode() {
|
|
|
cfg.DNSMode = "on"
|
|
|
}
|
|
@@ -224,6 +225,15 @@ func GetCoreDNSAddr() string {
|
|
|
return addr
|
|
|
}
|
|
|
|
|
|
+// GetPublicBrokerEndpoint - returns the public broker endpoint which shall be used by netclient
|
|
|
+func GetPublicBrokerEndpoint() string {
|
|
|
+ if os.Getenv("BROKER_ENDPOINT") != "" {
|
|
|
+ return os.Getenv("BROKER_ENDPOINT")
|
|
|
+ } else {
|
|
|
+ return config.Config.Server.BrokerEndpoint
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
// GetMessageQueueEndpoint - gets the message queue endpoint
|
|
|
func GetMessageQueueEndpoint() (string, bool) {
|
|
|
host, _ := GetPublicIP()
|