servercfg: remove AgentBackend

This commit is contained in:
yearski 2023-02-20 02:16:12 -07:00 committed by GitHub
parent 74deaf991b
commit ac16492b22
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -46,10 +46,6 @@ func GetServerConfig() config.ServerConfig {
if IsRestBackend() {
cfg.RestBackend = "on"
}
cfg.AgentBackend = "off"
if IsAgentBackend() {
cfg.AgentBackend = "on"
}
cfg.DNSMode = "off"
if IsDNSMode() {
cfg.DNSMode = "on"
@ -304,21 +300,6 @@ func IsMetricsExporter() bool {
return export
}
// IsAgentBackend - checks if agent backed is on or off
func IsAgentBackend() bool {
isagent := true
if os.Getenv("AGENT_BACKEND") != "" {
if os.Getenv("AGENT_BACKEND") == "off" {
isagent = false
}
} else if config.Config.Server.AgentBackend != "" {
if config.Config.Server.AgentBackend == "off" {
isagent = false
}
}
return isagent
}
// IsMessageQueueBackend - checks if message queue is on or off
func IsMessageQueueBackend() bool {
ismessagequeue := true