summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBrad Fitzpatrick <bradfitz@tailscale.com>2025-03-24 10:15:37 -0700
committerBrad Fitzpatrick <brad@danga.com>2025-03-24 10:43:15 -0700
commit156cd53e7734407dc42e30af2f12cf6956cd9e24 (patch)
treeb44860fb3440c0560f4a7efc2a1321af6d4e2797
parent5c0e08fbbd0982db61cc0baab8abfafbe22734cd (diff)
downloadtailscale-156cd53e7734407dc42e30af2f12cf6956cd9e24.tar.xz
tailscale-156cd53e7734407dc42e30af2f12cf6956cd9e24.zip
net/netmon: unexport GetState
Baby step towards #15408. Updates #15408 Change-Id: I11fca6e677af2ad2f065d83aa0d83550143bff29 Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
-rw-r--r--net/netmon/interfaces_test.go2
-rw-r--r--net/netmon/netmon.go2
-rw-r--r--net/netmon/state.go2
3 files changed, 3 insertions, 3 deletions
diff --git a/net/netmon/interfaces_test.go b/net/netmon/interfaces_test.go
index edd4f6d6e..5fec274ca 100644
--- a/net/netmon/interfaces_test.go
+++ b/net/netmon/interfaces_test.go
@@ -13,7 +13,7 @@ import (
)
func TestGetState(t *testing.T) {
- st, err := GetState()
+ st, err := getState()
if err != nil {
t.Fatal(err)
}
diff --git a/net/netmon/netmon.go b/net/netmon/netmon.go
index 47b540d6a..b58356d33 100644
--- a/net/netmon/netmon.go
+++ b/net/netmon/netmon.go
@@ -161,7 +161,7 @@ func (m *Monitor) InterfaceState() *State {
}
func (m *Monitor) interfaceStateUncached() (*State, error) {
- return GetState()
+ return getState()
}
// SetTailscaleInterfaceName sets the name of the Tailscale interface. For
diff --git a/net/netmon/state.go b/net/netmon/state.go
index a612dd06d..b6a6b2ab8 100644
--- a/net/netmon/state.go
+++ b/net/netmon/state.go
@@ -466,7 +466,7 @@ var getPAC func() string
// It does not set the returned State.IsExpensive. The caller can populate that.
//
// Deprecated: use netmon.Monitor.InterfaceState instead.
-func GetState() (*State, error) {
+func getState() (*State, error) {
s := &State{
InterfaceIPs: make(map[string][]netip.Prefix),
Interface: make(map[string]Interface),