MCPcopy Index your code
hub / github.com/tailscale/tailscale / PollNetMap

Method PollNetMap

control/controlclient/direct.go:965–967  ·  view source on GitHub ↗

PollNetMap makes a /map request to download the network map, calling NetmapUpdater on each update from the control plane. It always returns a non-nil error describing the reason for the failure or why the request ended.

(ctx context.Context, nu NetmapUpdater)

Source from the content-addressed store, hash-verified

963// It always returns a non-nil error describing the reason for the failure or
964// why the request ended.
965func (c *Direct) PollNetMap(ctx context.Context, nu NetmapUpdater) error {
966 return c.sendMapRequest(ctx, true, nu)
967}
968
969// rememberLastNetmapUpdater is a container that remembers the last netmap
970// update it observed. It is used by tests and [NetmapFromMapResponseForDebug].

Callers 1

mapRoutineMethod · 0.80

Calls 1

sendMapRequestMethod · 0.95

Tested by

no test coverage detected