tailscale

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2026 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const AIGPUTag = "tag:ai-gpu"

Variables

This section is empty.

Functions

func EnrollmentTagHelp added in v0.18.1

func EnrollmentTagHelp() string

EnrollmentTagHelp explains how to mark AI GPU servers in Tailscale.

func InstallInstructions

func InstallInstructions() string

InstallInstructions returns platform-specific install instructions.

func IsInstalled

func IsInstalled() bool

IsInstalled checks if the tailscale CLI is available.

Types

type Peer

type Peer struct {
	HostName string   `json:"HostName"`
	DNSName  string   `json:"DNSName"`
	TailAddr string   `json:"TailscaleIPs"` // parsed from array
	IPs      []string // parsed from TailscaleIPs
	Online   bool     `json:"Online"`
	OS       string   `json:"OS"`
	Tags     []string `json:"Tags"`
}

Peer represents a Tailscale peer device.

func (Peer) HasTag added in v0.18.1

func (p Peer) HasTag(tag string) bool

HasTag reports whether the peer has the given tag.

func (Peer) HighlightedTags added in v0.18.1

func (p Peer) HighlightedTags() []string

HighlightedTags returns Yokai-recognized tags in display order.

func (Peer) OtherTags added in v0.18.1

func (p Peer) OtherTags() []string

OtherTags returns non-highlighted raw tags in sorted order.

type Status

type Status struct {
	BackendState string                 `json:"BackendState"` // "Running", "Stopped", "NeedsLogin"
	Self         *statusPeer            `json:"Self"`
	Peers        map[string]*statusPeer `json:"Peer"`
}

Status represents the result of `tailscale status --json`.

func GetStatus

func GetStatus() (*Status, error)

GetStatus runs `tailscale status --json` and parses the result.

func (*Status) IsRunning

func (s *Status) IsRunning() bool

IsRunning returns true if Tailscale backend is in Running state.

func (*Status) ListPeers

func (s *Status) ListPeers() []Peer

ListPeers returns online peers as a simple slice.

func (*Status) NeedsLogin

func (s *Status) NeedsLogin() bool

NeedsLogin returns true if Tailscale needs authentication.

func (*Status) OnlinePeers

func (s *Status) OnlinePeers() []Peer

OnlinePeers returns only peers that are currently online.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL