Browse Source

add egress id to model

Abhishek Kondur 2 years ago
parent
commit
b7d3c5b7bd
2 changed files with 4 additions and 2 deletions
  1. 1 0
      logic/peers.go
  2. 3 2
      models/mqtt.go

+ 1 - 0
logic/peers.go

@@ -462,6 +462,7 @@ func GetPeerUpdateForHost(host *models.Host) (models.HostPeerUpdate, error) {
 		}
 		if node.IsEgressGateway {
 			hostPeerUpdate.EgressInfo[node.ID.String()] = models.EgressInfo{
+				EgressID:    node.ID.String(),
 				GwPeers:     nodePeerMap,
 				EgressGWCfg: node.EgressGatewayRequest,
 			}

+ 3 - 2
models/mqtt.go

@@ -37,8 +37,9 @@ type IngressInfo struct {
 }
 
 type EgressInfo struct {
-	GwPeers     map[string]PeerRouteInfo
-	EgressGWCfg EgressGatewayRequest
+	EgressID    string                   `json:"egress_id" yaml:"egress_id"`
+	GwPeers     map[string]PeerRouteInfo `json:"gateway_peers" yaml:"gateway_peers"`
+	EgressGWCfg EgressGatewayRequest     `json:"egress_gateway_cfg" yaml:"egress_gateway_cfg"`
 }
 
 // PeerRouteInfo - struct for peer info for an ext. client