hookup network map store

This commit is contained in:
pascal
2026-08-03 16:33:46 +02:00
parent b8e004ea89
commit 2bb55b6c88
29 changed files with 585 additions and 174 deletions

View File

@@ -65,7 +65,7 @@ func (nmd *NetworkMapData) GetPeerNetworkMapComponents(peerID string, peersCusto
components.Routes = relevantRoutes
components.AllDNSRecords = filterDNSRecordsByPeers(peersCustomZone.Records, relevantPeers, peer.SupportsIPv6() && peer.IPv6.IsValid())
peerGroups := nmd.getPeerGroups(peerID)
peerGroups := nmd.GetPeerGroups(peerID)
components.AccountZones = nmd.appliedZones(peerGroups)
components.AccountZones = append(components.AccountZones, nmd.privateServiceZones(peerGroups)...)
@@ -473,7 +473,7 @@ func (nmd *NetworkMapData) getPostureValidPeersSaveFailed(inputPeers []string, p
return dest
}
func (nmd *NetworkMapData) getPeerGroups(peerID string) map[string]struct{} {
func (nmd *NetworkMapData) GetPeerGroups(peerID string) map[string]struct{} {
groups := make(map[string]struct{})
for groupID, group := range nmd.Groups {
if slices.Contains(group.Peers, peerID) {