tailscale/types
M. J. Fromberger 9385dfe7f6
ipn/ipnlocal/netmapcache: add a package to split and cache network maps (#18497)
This commit is based on part of #17925, reworked as a separate package.

Add a package that can store and load netmap.NetworkMap values in persistent
storage, using a basic columnar representation. This commit includes a default
storage interface based on plain files, but the interface can be implemented
with more structured storage if we want to later.

The tests are set up to require that all the fields of the NetworkMap are
handled, except those explicitly designated as not-cached, and check that a
fully-populated value can round-trip correctly through the cache.  Adding or
removing fields, either in the NetworkMap or in the cached representation, will
trigger either build failures (e.g., for type mismatch) or test failures (e.g.,
for representation changes or missing fields). This isn't quite as nice as
automatically updating the representation, which I also prototyped, but is much
simpler to maintain and less code.

This commit does not yet hook up the cache to the backend, that will be a
subsequent change.

Updates #12639

Change-Id: Icb48639e1d61f2aec59904ecd172c73e05ba7bf9
Signed-off-by: M. J. Fromberger <fromberger@tailscale.com>
2026-01-26 14:55:30 -08:00
..
appctype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
bools all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
dnstype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
empty all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
flagtype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
geo all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
iox all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ipproto all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
jsonx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
key all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
lazy all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
logger all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
logid all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
mapx all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netlogfunc all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netlogtype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
netmap ipn/ipnlocal/netmapcache: add a package to split and cache network maps (#18497) 2026-01-26 14:55:30 -08:00
nettype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
opt all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
persist all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
prefs all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
preftype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
ptr all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
result all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
structs all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
tkatype all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00
views all: remove AUTHORS file and references to it 2026-01-23 15:49:45 -08:00