net/netmon: unexport GetState

Baby step towards #15408.

Updates #15408

Change-Id: I11fca6e677af2ad2f065d83aa0d83550143bff29
Signed-off-by: Brad Fitzpatrick <bradfitz@tailscale.com>
This commit is contained in:
Brad Fitzpatrick 2025-03-24 10:15:37 -07:00 committed by Brad Fitzpatrick
parent 5c0e08fbbd
commit 156cd53e77
3 changed files with 3 additions and 3 deletions

View File

@ -13,7 +13,7 @@ import (
) )
func TestGetState(t *testing.T) { func TestGetState(t *testing.T) {
st, err := GetState() st, err := getState()
if err != nil { if err != nil {
t.Fatal(err) t.Fatal(err)
} }

View File

@ -161,7 +161,7 @@ func (m *Monitor) InterfaceState() *State {
} }
func (m *Monitor) interfaceStateUncached() (*State, error) { func (m *Monitor) interfaceStateUncached() (*State, error) {
return GetState() return getState()
} }
// SetTailscaleInterfaceName sets the name of the Tailscale interface. For // SetTailscaleInterfaceName sets the name of the Tailscale interface. For

View File

@ -466,7 +466,7 @@ var getPAC func() string
// It does not set the returned State.IsExpensive. The caller can populate that. // It does not set the returned State.IsExpensive. The caller can populate that.
// //
// Deprecated: use netmon.Monitor.InterfaceState instead. // Deprecated: use netmon.Monitor.InterfaceState instead.
func GetState() (*State, error) { func getState() (*State, error) {
s := &State{ s := &State{
InterfaceIPs: make(map[string][]netip.Prefix), InterfaceIPs: make(map[string][]netip.Prefix),
Interface: make(map[string]Interface), Interface: make(map[string]Interface),