@ -13,7 +13,6 @@ import (
"fmt"
"fmt"
"io"
"io"
"log"
"log"
"time"
"tailscale.com/envknob"
"tailscale.com/envknob"
"tailscale.com/tailcfg"
"tailscale.com/tailcfg"
@ -52,10 +51,6 @@ type SetPrefsArgs struct {
New * Prefs
New * Prefs
}
}
type FakeExpireAfterArgs struct {
Duration time . Duration
}
type PingArgs struct {
type PingArgs struct {
IP string
IP string
UseTSMP bool
UseTSMP bool
@ -83,7 +78,6 @@ type Command struct {
SetPrefs * SetPrefsArgs
SetPrefs * SetPrefsArgs
RequestEngineStatus * NoArgs
RequestEngineStatus * NoArgs
RequestStatus * NoArgs
RequestStatus * NoArgs
FakeExpireAfter * FakeExpireAfterArgs
Ping * PingArgs
Ping * PingArgs
}
}
@ -205,9 +199,6 @@ func (bs *BackendServer) GotCommand(ctx context.Context, cmd *Command) error {
} else if c := cmd . SetPrefs ; c != nil {
} else if c := cmd . SetPrefs ; c != nil {
bs . b . SetPrefs ( c . New )
bs . b . SetPrefs ( c . New )
return nil
return nil
} else if c := cmd . FakeExpireAfter ; c != nil {
bs . b . FakeExpireAfter ( c . Duration )
return nil
}
}
return fmt . Errorf ( "BackendServer.Do: no command specified" )
return fmt . Errorf ( "BackendServer.Do: no command specified" )
}
}
@ -320,10 +311,6 @@ func (bc *BackendClient) RequestStatus() {
bc . send ( Command { AllowVersionSkew : true , RequestStatus : & NoArgs { } } )
bc . send ( Command { AllowVersionSkew : true , RequestStatus : & NoArgs { } } )
}
}
func ( bc * BackendClient ) FakeExpireAfter ( x time . Duration ) {
bc . send ( Command { FakeExpireAfter : & FakeExpireAfterArgs { Duration : x } } )
}
func ( bc * BackendClient ) Ping ( ip string , useTSMP bool ) {
func ( bc * BackendClient ) Ping ( ip string , useTSMP bool ) {
bc . send ( Command { Ping : & PingArgs {
bc . send ( Command { Ping : & PingArgs {
IP : ip ,
IP : ip ,