appc: factor app connector arguments into a Config type (#17389)

Replace the positional arguments to NewAppConnector with a Config struct.
Update the existing uses. Other than the API change, there are no functional
changes in this commit.

Updates #15160
Updates #17192

Change-Id: Ibf37f021372155a4db8aaf738f4b4f2c746bf623
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
This commit is contained in:
M. J. Fromberger
2025-10-01 11:39:01 -07:00
committed by GitHub
parent 05a4c8e839
commit 6f7ce5eb5d
5 changed files with 133 additions and 38 deletions
+6 -1
View File
@@ -4802,7 +4802,12 @@ func (b *LocalBackend) reconfigAppConnectorLocked(nm *netmap.NetworkMap, prefs i
}
storeFunc = b.storeRouteInfo
}
b.appConnector = appc.NewAppConnector(b.logf, b, ri, storeFunc)
b.appConnector = appc.NewAppConnector(appc.Config{
Logf: b.logf,
RouteAdvertiser: b,
RouteInfo: ri,
StoreRoutesFunc: storeFunc,
})
}
if nm == nil {
return