wgengine/wglog: stop using netmap.NetworkMap here too
This applies the same treatment from 8f210454dd (netlog) to wglog,
ending use of netmap.NetworkMap and instead getting the canonical data
from LocalBackend/nodeBackend.
This is a dependency to removing the netmap.NetworkMap from
upstream callers, like wgengine.Engine in general.
Updates #12542
Change-Id: Icb5af0799322def048a6f594b49f7d11273f025d
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
committed by
Brad Fitzpatrick
parent
295bf20cfd
commit
988b0905bb
@@ -172,6 +172,16 @@ type Engine interface {
|
||||
// before any [Engine.Reconfig] call that starts up the network logger.
|
||||
SetNetLogNodeSource(netlog.NodeSource)
|
||||
|
||||
// SetWGPeerLookup installs the function used by the engine's
|
||||
// wireguard-go log wrapper to rewrite peer references in log lines
|
||||
// (mapping wireguard-go's "peer(XXXX…YYYY)" form to the
|
||||
// Tailscale-conventional short string form).
|
||||
//
|
||||
// It is expected to be called once during LocalBackend construction.
|
||||
// The function is called concurrently and must be safe to call with
|
||||
// no Engine locks held.
|
||||
SetWGPeerLookup(func(wgString string) (tsString string, ok bool))
|
||||
|
||||
// SetPeerSessionStateFunc installs a callback used to observe WireGuard
|
||||
// peer session state transitions.
|
||||
//
|
||||
|
||||
Reference in New Issue
Block a user