diff options
| author | M. J. Fromberger <fromberger@tailscale.com> | 2026-04-15 10:08:30 -0700 |
|---|---|---|
| committer | M. J. Fromberger <fromberger@tailscale.com> | 2026-04-15 10:09:04 -0700 |
| commit | bc8095df38f42c9381886660e2723e920bc68811 (patch) | |
| tree | 234a0bd240730141ff848ea9c943c65e581632c7 | |
| parent | 61c95f409c90728d3c3ad2627ea77fa4e1a48390 (diff) | |
| download | tailscale-mjf/nmc-omit-selective.tar.xz tailscale-mjf/nmc-omit-selective.zip | |
ipn/ipnlocal: disable netmap caching for iosmjf/nmc-omit-selective
Updates #todo
Change-Id: I3efa627729de23c00022dfc46493ab94921aa68c
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
| -rw-r--r-- | ipn/ipnlocal/diskcache.go | 2 | ||||
| -rw-r--r-- | ipn/ipnlocal/diskcache_disabled.go | 41 |
2 files changed, 43 insertions, 0 deletions
diff --git a/ipn/ipnlocal/diskcache.go b/ipn/ipnlocal/diskcache.go index 03ced7967..350d7f4fc 100644 --- a/ipn/ipnlocal/diskcache.go +++ b/ipn/ipnlocal/diskcache.go @@ -1,6 +1,8 @@ // Copyright (c) Tailscale Inc & contributors // SPDX-License-Identifier: BSD-3-Clause +//go:build !ios + package ipnlocal import ( diff --git a/ipn/ipnlocal/diskcache_disabled.go b/ipn/ipnlocal/diskcache_disabled.go new file mode 100644 index 000000000..fa2132655 --- /dev/null +++ b/ipn/ipnlocal/diskcache_disabled.go @@ -0,0 +1,41 @@ +// Copyright (c) Tailscale Inc & contributors +// SPDX-License-Identifier: BSD-3-Clause + +//go:build ios + +package ipnlocal + +import ( + "context" + + "tailscale.com/ipn/ipnlocal/netmapcache" + "tailscale.com/types/netmap" +) + +// diskCache is the state netmap caching to disk. +type diskCache struct { +} + +func (b *LocalBackend) writeNetmapToDiskLocked(nm *netmap.NetworkMap) error { + return nil // not supported on this platform +} + +func (b *LocalBackend) loadDiskCacheLocked() (om *netmap.NetworkMap, ok bool) { + return nil, false // not supported on this platform +} + +// discardDiskCacheLocked removes a cached network map for the current node, if +// one exists, and disables the cache. +func (b *LocalBackend) discardDiskCacheLocked() {} + +// clearStoreLocked discards all the keys in the specified store. +func (b *LocalBackend) clearStoreLocked(ctx context.Context, store netmapcache.Store) error { + return nil // not supported on this platform +} + +// ClearNetmapCache discards stored netmap caches (if any) for profiles for the +// current user of b. It also drops any cache from the active backend session, +// if there is one. +func (b *LocalBackend) ClearNetmapCache(ctx context.Context) error { + return nil // not supported on this platform +} |
