mirror of
https://github.com/gravitl/netmaker.git
synced 2025-09-06 13:14:24 +08:00
remove duplicate env var
This commit is contained in:
parent
b803e64ee4
commit
c57c892119
2 changed files with 4 additions and 5 deletions
|
@ -36,7 +36,7 @@ type ServerConfig struct {
|
|||
APIConnString string `yaml:"apiconn"`
|
||||
APIHost string `yaml:"apihost"`
|
||||
APIPort string `yaml:"apiport"`
|
||||
BrokerEndpoint string `yaml:"brokerendpoint"`
|
||||
Broker string `yam:"broker"`
|
||||
ServerBrokerEndpoint string `yaml:"serverbrokerendpoint"`
|
||||
BrokerType string `yaml:"brokertype"`
|
||||
EmqxRestEndpoint string `yaml:"emqxrestendpoint"`
|
||||
|
@ -66,7 +66,6 @@ type ServerConfig struct {
|
|||
Telemetry string `yaml:"telemetry"`
|
||||
HostNetwork string `yaml:"hostnetwork"`
|
||||
Server string `yaml:"server"`
|
||||
Broker string `yam:"broker"`
|
||||
PublicIPService string `yaml:"publicipservice"`
|
||||
MQPassword string `yaml:"mqpassword"`
|
||||
MQUserName string `yaml:"mqusername"`
|
||||
|
|
|
@ -230,7 +230,7 @@ func GetPublicBrokerEndpoint() string {
|
|||
if os.Getenv("BROKER_ENDPOINT") != "" {
|
||||
return os.Getenv("BROKER_ENDPOINT")
|
||||
} else {
|
||||
return config.Config.Server.BrokerEndpoint
|
||||
return config.Config.Server.Broker
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -243,8 +243,8 @@ func GetMessageQueueEndpoint() (string, bool) {
|
|||
host = config.Config.Server.ServerBrokerEndpoint
|
||||
} else if os.Getenv("BROKER_ENDPOINT") != "" {
|
||||
host = os.Getenv("BROKER_ENDPOINT")
|
||||
} else if config.Config.Server.BrokerEndpoint != "" {
|
||||
host = config.Config.Server.BrokerEndpoint
|
||||
} else if config.Config.Server.Broker != "" {
|
||||
host = config.Config.Server.Broker
|
||||
} else {
|
||||
host += ":1883" // default
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue