setup

package
v0.1.15 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Install

func Install(opts InstallOptions) error

Install performs a full tailkitd installation on the current node.

Steps (in order):

  1. Detect Docker and systemd
  2. Create system user (+ docker group membership if Docker present)
  3. Create directory layout
  4. Write skeleton config files (idempotent — skips existing files)
  5. Write /etc/tailkitd/env (idempotent)
  6. Copy binary to /usr/local/bin/tailkitd (atomic)
  7. Write systemd unit file
  8. Enable service (daemon-reload + systemctl enable)
  9. Run verify — abort if any error
  10. Start service and wait for READY

func Uninstall

func Uninstall() error

Uninstall stops, disables, and removes tailkitd from the current node. Config files and state are preserved — this is a service removal, not a full wipe. Run `rm -rf /etc/tailkitd /var/lib/tailkitd` manually if a full wipe is needed.

Types

type InstallOptions

type InstallOptions struct {
	// AuthKey is the Tailscale auth key. Required.
	AuthKey string

	// Hostname overrides the node's Tailnet hostname.
	// If empty, the system hostname is used.
	Hostname string
}

InstallOptions holds the parameters for a full node installation.

type Report

type Report struct {
	// contains filtered or unexported fields
}

Report is the full result of Verify().

func Verify

func Verify() *Report

Verify runs all validation checks and returns a Report. It uses the existing Load*Config functions from internal/config so every check uses exactly the same logic tailkitd uses at startup. No writes are performed — safe to run at any time.

func (*Report) Errors

func (r *Report) Errors() int

Errors returns the count of error-level checks.

func (*Report) HasErrors

func (r *Report) HasErrors() bool

HasErrors returns true if any check failed with levelError.

func (*Report) HasWarnings

func (r *Report) HasWarnings() bool

HasWarnings returns true if any check produced a warning.

func (*Report) Print

func (r *Report) Print(w io.Writer)

Print writes a human-readable report to w.

func (*Report) Warnings

func (r *Report) Warnings() int

Warnings returns the count of warning-level checks.

Jump to

Keyboard shortcuts

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