net/sockstats: remove explicit dependency on wgengine/monitor
Followup to #7177 to avoid adding extra dependencies to the CLI. We instead declare an interface for the link monitor. Signed-off-by: Mihai Parparita <mihai@tailscale.com>
This commit is contained in:
@@ -13,7 +13,6 @@ import (
|
||||
"sync/atomic"
|
||||
|
||||
"tailscale.com/net/interfaces"
|
||||
"tailscale.com/wgengine/monitor"
|
||||
)
|
||||
|
||||
type sockStatCounters struct {
|
||||
@@ -113,7 +112,7 @@ func get() *SockStats {
|
||||
return r
|
||||
}
|
||||
|
||||
func setLinkMonitor(lm *monitor.Mon) {
|
||||
func setLinkMonitor(lm LinkMonitor) {
|
||||
sockStats.mu.Lock()
|
||||
defer sockStats.mu.Unlock()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user