control/controlclient, localapi: shorten expiry time via localapi (#4112)

Signed-off-by: Nick O'Neill <nick@tailscale.com>
This commit is contained in:
Nick O'Neill
2022-03-09 14:42:42 -08:00
committed by GitHub
parent 2bcc047d4f
commit 1625e87526
6 changed files with 73 additions and 2 deletions

View File

@@ -11,6 +11,7 @@ package controlclient
import (
"context"
"time"
"tailscale.com/tailcfg"
)
@@ -45,6 +46,9 @@ type Client interface {
// Logout starts a synchronous logout process. It doesn't return
// until the logout operation has been completed.
Logout(context.Context) error
// SetExpirySooner sets the node's expiry time via the controlclient,
// as long as it's shorter than the current expiry time.
SetExpirySooner(context.Context, time.Time) error
// SetPaused pauses or unpauses the controlclient activity as much
// as possible, without losing its internal state, to minimize
// unnecessary network activity.