add ingress id to model

This commit is contained in:
abhishek9686 2024-10-21 12:52:02 +04:00
parent 7fa6580103
commit cd2d026fc8
2 changed files with 4 additions and 2 deletions

View file

@ -293,7 +293,8 @@ func GetPeerUpdateForHost(network string, host *models.Host, allNodes []models.N
extPeers, extPeerIDAndAddrs, egressRoutes, extUserIps, err = GetExtPeers(&node, &node)
if err == nil {
hostPeerUpdate.FwUpdate.IngressInfo[node.ID.String()] = models.IngressInfo{
UserIps: extUserIps,
IngressID: node.ID.String(),
UserIps: extUserIps,
}
hostPeerUpdate.EgressRoutes = append(hostPeerUpdate.EgressRoutes, egressRoutes...)
hostPeerUpdate.Peers = append(hostPeerUpdate.Peers, extPeers...)

View file

@ -28,7 +28,8 @@ type HostPeerUpdate struct {
// IngressInfo - struct for ingress info
type IngressInfo struct {
UserIps []net.IP
IngressID string `json:"ingress_id"`
UserIps []net.IP `json:"user_ips"`
}
// EgressInfo - struct for egress info