ipn/localapi,client/local: add services over localapi

Updates tailscale/corp#40052

Signed-off-by: Adriano Sela Aviles <adriano@tailscale.com>
This commit is contained in:
Adriano Sela Aviles
2026-04-13 08:52:10 -07:00
committed by Adriano Sela Aviles
parent aa9a76cf30
commit 21880457eb
3 changed files with 28 additions and 0 deletions
+3
View File
@@ -149,6 +149,9 @@ func (nm *NetworkMap) GetIPVIPServiceMap() IPServiceMappings {
// Services returns the Services visible (accessible) to this node,
// decoded from [tailcfg.NodeAttrPrefixServices]+serviceName entries in the
// self node's CapMap. Returns nil if nm is nil or SelfNode is invalid.
//
// TODO(adrianosela): cache the result of decoding the capmap so
// we don't have to decode it multiple times after each netmap update.
func (nm *NetworkMap) Services() map[tailcfg.ServiceName]tailcfg.ServiceDetails {
if nm == nil || !nm.SelfNode.Valid() {
return nil