@@ -46,10 +46,6 @@ func GetServerConfig() config.ServerConfig {
4646 if IsRestBackend () {
4747 cfg .RestBackend = "on"
4848 }
49- cfg .AgentBackend = "off"
50- if IsAgentBackend () {
51- cfg .AgentBackend = "on"
52- }
5349 cfg .DNSMode = "off"
5450 if IsDNSMode () {
5551 cfg .DNSMode = "on"
@@ -167,15 +163,6 @@ func GetAPIHost() string {
167163 return serverhost
168164}
169165
170- // GetPodIP - get the pod's ip
171- func GetPodIP () string {
172- podip := "127.0.0.1"
173- if os .Getenv ("POD_IP" ) != "" {
174- podip = os .Getenv ("POD_IP" )
175- }
176- return podip
177- }
178-
179166// GetAPIPort - gets the api port
180167func GetAPIPort () string {
181168 apiport := "8081"
@@ -198,19 +185,6 @@ func GetStunAddr() string {
198185 return stunAddr
199186}
200187
201- // GetDefaultNodeLimit - get node limit if one is set
202- func GetDefaultNodeLimit () int32 {
203- var limit int32
204- limit = 999999999
205- envlimit , err := strconv .Atoi (os .Getenv ("DEFAULT_NODE_LIMIT" ))
206- if err == nil && envlimit != 0 {
207- limit = int32 (envlimit )
208- } else if config .Config .Server .DefaultNodeLimit != 0 {
209- limit = config .Config .Server .DefaultNodeLimit
210- }
211- return limit
212- }
213-
214188// GetCoreDNSAddr - gets the core dns address
215189func GetCoreDNSAddr () string {
216190 addr , _ := GetPublicIP ()
@@ -313,21 +287,6 @@ func IsMetricsExporter() bool {
313287 return export
314288}
315289
316- // IsAgentBackend - checks if agent backed is on or off
317- func IsAgentBackend () bool {
318- isagent := true
319- if os .Getenv ("AGENT_BACKEND" ) != "" {
320- if os .Getenv ("AGENT_BACKEND" ) == "off" {
321- isagent = false
322- }
323- } else if config .Config .Server .AgentBackend != "" {
324- if config .Config .Server .AgentBackend == "off" {
325- isagent = false
326- }
327- }
328- return isagent
329- }
330-
331290// IsMessageQueueBackend - checks if message queue is on or off
332291func IsMessageQueueBackend () bool {
333292 ismessagequeue := true
@@ -525,18 +484,6 @@ func SetNodeID(id string) {
525484 config .Config .Server .NodeID = id
526485}
527486
528- // GetServerCheckinInterval - gets the server check-in time
529- func GetServerCheckinInterval () int64 {
530- var t = int64 (5 )
531- var envt , _ = strconv .Atoi (os .Getenv ("SERVER_CHECKIN_INTERVAL" ))
532- if envt > 0 {
533- t = int64 (envt )
534- } else if config .Config .Server .ServerCheckinInterval > 0 {
535- t = config .Config .Server .ServerCheckinInterval
536- }
537- return t
538- }
539-
540487// GetAuthProviderInfo = gets the oauth provider info
541488func GetAuthProviderInfo () (pi []string ) {
542489 var authProvider = ""
0 commit comments