Przeglądaj źródła

static node init

abhishek9686 11 miesięcy temu
rodzic
commit
287bcd8abc
1 zmienionych plików z 13 dodań i 0 usunięć
  1. 13 0
      logic/extpeers.go

+ 13 - 0
logic/extpeers.go

@@ -528,3 +528,16 @@ func GetExtclientAllowedIPs(client models.ExtClient) (allowedIPs []string) {
 	}
 	return
 }
+
+func GetStaticNodesByGw(gwNode models.Node) (staticNode []models.Node) {
+	extClients, err := GetAllExtClients()
+	if err != nil {
+		return
+	}
+	for _, extI := range extClients {
+		if extI.IngressGatewayID == gwNode.ID.String() {
+			staticNode = append(staticNode, models.Node{})
+		}
+	}
+	return
+}