From f92ce2d4caa61af3e0a347dc294417b4f700dcaf Mon Sep 17 00:00:00 2001 From: mcoulombe Date: Wed, 8 Oct 2025 16:54:27 -0400 Subject: [PATCH] tailscale/client: add connectedToControl field on device response Updates tailscale/corp#31905 Signed-off-by: mcoulombe --- .github/workflows/ci.yml | 2 +- tailscale/client.go | 1 + tailscale/client_test.go | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2307dad..4cadbfa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -20,7 +20,7 @@ jobs: echo "module=$(go env GOMODCACHE)" | tee -a $GITHUB_OUTPUT - name: Set up cache - uses: actions/cache@v2 + uses: actions/cache@v4 with: path: | ${{ steps.cache.outputs.build }} diff --git a/tailscale/client.go b/tailscale/client.go index 824fccd..954ecdc 100644 --- a/tailscale/client.go +++ b/tailscale/client.go @@ -721,6 +721,7 @@ type Device struct { Expires Time `json:"expires"` Hostname string `json:"hostname"` IsExternal bool `json:"isExternal"` + ConnectedToControl bool `json:"connectedToControl"` LastSeen Time `json:"lastSeen"` MachineKey string `json:"machineKey"` NodeKey string `json:"nodeKey"` diff --git a/tailscale/client_test.go b/tailscale/client_test.go index b1efc9b..06796ec 100644 --- a/tailscale/client_test.go +++ b/tailscale/client_test.go @@ -422,6 +422,7 @@ func TestClient_Devices(t *testing.T) { Expires: tailscale.Time{time.Date(2022, 8, 9, 11, 50, 23, 0, time.UTC)}, Hostname: "test", IsExternal: false, + ConnectedToControl: false, LastSeen: tailscale.Time{time.Date(2022, 3, 9, 20, 3, 42, 0, time.UTC)}, MachineKey: "mkey:test", NodeKey: "nodekey:test",