tsapi

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApprovalSummary

func ApprovalSummary(hosts []ServiceHost) string

ApprovalSummary is a compact host-approval line for show/status.

func LoadDotEnv

func LoadDotEnv(path string) error

LoadDotEnv reads KEY=VALUE lines from path into the process environment. Existing variables are not overwritten. Missing files are ignored.

func NewClient

func NewClient() (*tailscale.Client, error)

NewClient builds a control-plane client. Auth: TS_API_KEY, or OAuth (TS_OAUTH_CLIENT_ID + TS_OAUTH_CLIENT_SECRET). Tailnet: TS_TAILNET, default "-" (the key's tailnet).

Types

type ServiceHost

type ServiceHost struct {
	NodeID        string `json:"nodeId"`
	ApprovalLevel string `json:"approvalLevel"`
	Configured    string `json:"configured"`
}

ServiceHost is one advertised host for a VIP Service.

func ListHosts

func ListHosts(ctx context.Context, name string) ([]ServiceHost, error)

ListHosts returns advertised hosts and their approval for svc:name.

Jump to

Keyboard shortcuts

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