summaryrefslogtreecommitdiffhomepage
path: root/control/controlclient/client.go
diff options
context:
space:
mode:
authorAndrea Gottardo <andrea@gottardo.me>2024-02-15 14:28:38 -0800
committerAndrea Gottardo <andrea@gottardo.me>2024-02-23 10:51:33 -0800
commit8a66006f371a408fe58a38eb4b1d1a755b6d17b5 (patch)
tree7452ca987589d6d1c5790b92394be47515ccdb89 /control/controlclient/client.go
parent131f9094fdeda05b0c949055d9b18a495f200769 (diff)
downloadtailscale-angott/sleep-debug-apis.tar.xz
tailscale-angott/sleep-debug-apis.zip
controlclient, ipn: add endpoints to manage sleep/wakeangott/sleep-debug-apis
Updates #3363. Adds localapi + debug endpoints to set/unset sleep mode. Signed-off-by: Andrea Gottardo <andrea@gottardo.me>
Diffstat (limited to 'control/controlclient/client.go')
-rw-r--r--control/controlclient/client.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/control/controlclient/client.go b/control/controlclient/client.go
index ef5af68c6..2acd82ef8 100644
--- a/control/controlclient/client.go
+++ b/control/controlclient/client.go
@@ -54,6 +54,10 @@ type Client interface {
// TODO: It might be better to simply shutdown the controlclient and
// make a new one when it's time to unpause.
SetPaused(bool)
+ // SetSleepMode pauses the control client and prevents anybody else
+ // from unpausing it until SetSleepMode(false) is called again
+ SetSleepMode(bool)
+ IsSleeping() bool
// AuthCantContinue returns whether authentication is blocked. If it
// is, you either need to visit the auth URL (previously sent in a
// Status callback) or call the Login function appropriately.