Documentation ¶
Overview ¶
Package tailscale tracks the tailscale state (e.g., version) if available.
Index ¶
Constants ¶
View Source
const ( StateNameTailscaleVersion = "tailscale_version" StateKeyTailscaleVersionData = "data" StateKeyTailscaleVersionEncoding = "encoding" StateValueTailscaleVersionEncodingJSON = "json" )
View Source
const Name = "tailscale"
Variables ¶
This section is empty.
Functions ¶
func TailscaleExists ¶
func TailscaleExists() bool
Types ¶
type Config ¶
type Config struct {
Query query_config.Config `json:"query"`
}
type Output ¶
type Output struct {
Version VersionInfo `json:"version"`
}
func ParseOutputJSON ¶
func ParseStatesToOutput ¶
func ParseStatesToOutput(states ...components.State) (*Output, error)
type VersionInfo ¶
type VersionInfo struct { MajorMinorPatch string `json:"majorMinorPatch"` Short string `json:"short"` Long string `json:"long"` UnstableBranch bool `json:"unstableBranch"` Cap int `json:"cap"` }
VersionInfo represents the JSON structure of the Tailscale version information.
func CheckVersion ¶
func CheckVersion() (*VersionInfo, error)
CheckVersion returns the tailscale version by running `tailscale version --json`.
func ParseVersion ¶
func ParseVersion(b []byte) (*VersionInfo, error)
ParseVersion parses the JSON-encoded version information from a byte slice.
Click to show internal directories.
Click to hide internal directories.