tsconfig

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TailscaleConfig

type TailscaleConfig struct {
	Hostname      string   `toml:"hostname"`
	StateDir      string   `toml:"state_dir"`
	AuthKey       string   `toml:"auth_key"`
	ControlURL    string   `toml:"control_url"`
	Ephemeral     bool     `toml:"ephemeral"`
	AdvertiseTags []string `toml:"advertise_tags"`
	// OAuth client secret (starts with "tskey-client-").
	ClientSecret string `toml:"client_secret"`
	// Workload Identity Federation fields.
	ClientID string `toml:"client_id"`
	IDToken  string `toml:"id_token"`
	Audience string `toml:"audience"`
}

TailscaleConfig holds all Tailscale connection settings. Only one auth method should be configured: auth_key, client_secret (OAuth), or client_id+id_token (WIF). When no auth fields are set, tsnet falls back to its built-in environment variable handling (TS_AUTHKEY, etc.).

func (*TailscaleConfig) Apply

func (c *TailscaleConfig) Apply(srv *tsnet.Server)

Apply sets non-zero config fields on the given tsnet.Server, leaving zero-value fields untouched so tsnet's built-in env var fallbacks still work.

func (*TailscaleConfig) Validate

func (c *TailscaleConfig) Validate() error

Validate checks that at most one auth method is configured and that required companion fields are present.

Jump to

Keyboard shortcuts

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