|
|
@ -3313,17 +3313,19 @@ func (b *LocalBackend) reconfigAppConnectorLocked(nm *netmap.NetworkMap, prefs i
|
|
|
|
return
|
|
|
|
return
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
var domains []string
|
|
|
|
|
|
|
|
for _, attr := range attrs {
|
|
|
|
|
|
|
|
// Geometric cost, assumes that the number of advertised tags is small
|
|
|
|
// Geometric cost, assumes that the number of advertised tags is small
|
|
|
|
if !nm.SelfNode.Tags().ContainsFunc(func(tag string) bool {
|
|
|
|
selfHasTag := func(attrTags []string) bool {
|
|
|
|
return slices.Contains(attr.Connectors, tag)
|
|
|
|
return nm.SelfNode.Tags().ContainsFunc(func(tag string) bool {
|
|
|
|
}) {
|
|
|
|
return slices.Contains(attrTags, tag)
|
|
|
|
continue
|
|
|
|
})
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var domains []string
|
|
|
|
|
|
|
|
for _, attr := range attrs {
|
|
|
|
|
|
|
|
if slices.Contains(attr.Connectors, "*") || selfHasTag(attr.Connectors) {
|
|
|
|
domains = append(domains, attr.Domains...)
|
|
|
|
domains = append(domains, attr.Domains...)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
slices.Sort(domains)
|
|
|
|
slices.Sort(domains)
|
|
|
|
slices.Compact(domains)
|
|
|
|
slices.Compact(domains)
|
|
|
|
b.appConnector.UpdateDomains(domains)
|
|
|
|
b.appConnector.UpdateDomains(domains)
|
|
|
|