introduce peerGroupsIdx to avoid looping through the groups to figure out peer membership

This commit is contained in:
pascal
2026-08-06 12:49:36 +02:00
parent 0513109c35
commit cff46eee67
2 changed files with 31 additions and 11 deletions

View File

@@ -1,6 +1,8 @@
package networkmap
import (
"sync"
"github.com/netbirdio/netbird/shared/management/networkmap/nmdata"
)
@@ -39,6 +41,9 @@ type NetworkMapData struct { //nolint:revive // established name across the code
AppliedZoneCandidates []AppliedZoneCandidate
PrivateServiceCandidates []PrivateServiceCandidate
peerGroupsOnce sync.Once
peerGroupsIdx map[string]map[string]struct{}
}
// AppliedZoneCandidate is an account-level custom DNS zone reduced to the