tailscale/ipn
Brad Fitzpatrick 9538e9f970 ipn/ipnlocal: keep internal map updated of latest Nodes post mutations
We have some flaky integration tests elsewhere that have no one place
to ask about the state of the world. This makes LocalBackend be that
place (as it's basically there anyway) but doesn't yet add the ForTest
accessor method.

This adds a LocalBackend.peers map[NodeID]NodeView that is
incrementally updated as mutations arrive. And then we start moving
away from using NetMap.Peers at runtime (UpdateStatus no longer uses
it now). And remove another copy of NodeView in the LocalBackend
nodeByAddr map. Change that to point into b.peers instead.

Future changes will then start streaming whole-node-granularity peer
change updates to WatchIPNBus clients, tracking statefully per client
what each has seen. This will get the GUI clients from receiving less
of a JSON storm of updates all the time.

Updates #1909

Change-Id: I14a976ca9f493bdf02ba7e6e05217363dcf422e5
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
2023-09-17 19:35:17 +01:00
..
ipnauth all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ipnlocal ipn/ipnlocal: keep internal map updated of latest Nodes post mutations 2023-09-17 19:35:17 +01:00
ipnserver logpolicy, various: allow overriding log function 2023-07-10 18:08:50 -04:00
ipnstate ipn/{ipnlocal,ipnstate}: start simplifying UpdateStatus/StatusBuilder 2023-09-17 15:38:54 +01:00
localapi ipn/ipnlocal: fix missing controlknobs.Knobs plumbing 2023-09-12 06:17:14 -07:00
policy ipn: prefer allow/denylist terminology 2023-04-04 08:02:50 -07:00
store cmd/k8s-operator,ipn/store/kubestore: patch secrets instead of updating 2023-08-29 13:24:05 -07:00
backend.go ipn, ipn/ipnlocal: add session identifier for WatchIPNBus 2023-09-05 13:30:04 -04:00
doc.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
fake_test.go all: update copyright and license headers 2023-01-27 15:36:29 -08:00
ipn_clone.go cmd/tailscale/cli: use optimistic concurrency control on SetServeConfig 2023-09-13 15:08:41 -05:00
ipn_view.go cmd/tailscale/cli: use optimistic concurrency control on SetServeConfig 2023-09-13 15:08:41 -05:00
prefs_test.go cmd/tailscale,ipn: add auto-update flags and prefs (#8861) 2023-09-01 13:45:12 -07:00
prefs.go cmd/tailscale,ipn: add auto-update flags and prefs (#8861) 2023-09-01 13:45:12 -07:00
serve_test.go tailscale/cli: add interactive flow for enabling Funnel 2023-08-09 18:55:43 -04:00
serve.go cmd/tailscale/cli: use optimistic concurrency control on SetServeConfig 2023-09-13 15:08:41 -05:00
store_test.go ipn: avoid useless no-op WriteState calls 2023-08-07 08:44:24 -07:00
store.go ipn: avoid useless no-op WriteState calls 2023-08-07 08:44:24 -07:00