2022-10-21 19:17:38 +08:00
|
|
|
package integration
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/netip"
|
2022-11-03 23:56:19 +08:00
|
|
|
"net/url"
|
2022-10-21 19:17:38 +08:00
|
|
|
|
|
|
|
"tailscale.com/ipn/ipnstate"
|
|
|
|
)
|
|
|
|
|
|
|
|
type TailscaleClient interface {
|
|
|
|
Hostname() string
|
|
|
|
Shutdown() error
|
|
|
|
Version() string
|
2022-11-04 00:00:23 +08:00
|
|
|
Execute(command []string) (string, string, error)
|
2022-10-21 19:17:38 +08:00
|
|
|
Up(loginServer, authKey string) error
|
2022-11-03 23:56:19 +08:00
|
|
|
UpWithLoginURL(loginServer string) (*url.URL, error)
|
2022-10-21 19:17:38 +08:00
|
|
|
IPs() ([]netip.Addr, error)
|
2022-10-23 17:55:37 +08:00
|
|
|
FQDN() (string, error)
|
2022-10-21 19:17:38 +08:00
|
|
|
Status() (*ipnstate.Status, error)
|
2022-11-13 20:06:53 +08:00
|
|
|
WaitForReady() error
|
2022-10-21 19:17:38 +08:00
|
|
|
WaitForPeers(expected int) error
|
2022-10-21 20:07:46 +08:00
|
|
|
Ping(hostnameOrIP string) error
|
2022-10-21 19:17:38 +08:00
|
|
|
}
|