Browse Source

send fw update on ingress delete

Abhishek Kondur 2 năm trước cách đây
mục cha
commit
c1f783c1cc
2 tập tin đã thay đổi với 5 bổ sung1 xóa
  1. 3 0
      controllers/node.go
  2. 2 1
      models/mqtt.go

+ 3 - 0
controllers/node.go

@@ -592,6 +592,9 @@ func deleteIngressGateway(w http.ResponseWriter, r *http.Request) {
 				removedClients[:],
 			)
 		}
+		mq.PublishFwUpdate(host, &models.FwAction{
+			Action: models.FwIngressDel,
+		})
 	}
 
 	runUpdates(&node, true)

+ 2 - 1
models/mqtt.go

@@ -93,5 +93,6 @@ type FwAction struct {
 const (
 	FwIngressUpdate FwActionType = "FW_INGRESS_UPDATE"
 	FwAllUpdate     FwActionType = "FW_ALL_UPDATE"
-	FwIngressDel    FwActionType = "FW_INGRESS_DEL"
+	FwIngressDel    FwActionType = "FW_INGRESS_DELETE"
+	FwEgressDel     FwActionType = "FW_EGRESS_DELETE"
 )