2022-10-21 07:17:38 -04:00
|
|
|
package integration
|
|
|
|
|
|
|
|
import (
|
|
|
|
"net/netip"
|
2022-11-03 11:56:19 -04:00
|
|
|
"net/url"
|
2022-10-21 07:17:38 -04:00
|
|
|
|
2023-02-02 10:05:52 -05:00
|
|
|
"github.com/juanfont/headscale/integration/tsic"
|
2022-10-21 07:17:38 -04:00
|
|
|
"tailscale.com/ipn/ipnstate"
|
|
|
|
)
|
|
|
|
|
2022-12-19 13:15:31 -05:00
|
|
|
// nolint
|
2022-10-21 07:17:38 -04:00
|
|
|
type TailscaleClient interface {
|
|
|
|
Hostname() string
|
|
|
|
Shutdown() error
|
|
|
|
Version() string
|
2022-11-03 12:00:23 -04:00
|
|
|
Execute(command []string) (string, string, error)
|
2022-10-21 07:17:38 -04:00
|
|
|
Up(loginServer, authKey string) error
|
2022-11-03 11:56:19 -04:00
|
|
|
UpWithLoginURL(loginServer string) (*url.URL, error)
|
2022-12-21 17:29:52 -05:00
|
|
|
Logout() error
|
2022-10-21 07:17:38 -04:00
|
|
|
IPs() ([]netip.Addr, error)
|
2022-10-23 05:55:37 -04:00
|
|
|
FQDN() (string, error)
|
2022-10-21 07:17:38 -04:00
|
|
|
Status() (*ipnstate.Status, error)
|
2022-11-13 07:06:53 -05:00
|
|
|
WaitForReady() error
|
2022-12-19 13:15:31 -05:00
|
|
|
WaitForLogout() error
|
2022-10-21 07:17:38 -04:00
|
|
|
WaitForPeers(expected int) error
|
2023-02-02 10:05:52 -05:00
|
|
|
Ping(hostnameOrIP string, opts ...tsic.PingOption) error
|
2023-03-20 03:52:52 -04:00
|
|
|
Curl(url string, opts ...tsic.CurlOption) (string, error)
|
2022-11-08 10:09:52 -05:00
|
|
|
ID() string
|
2022-10-21 07:17:38 -04:00
|
|
|
}
|