Documentation
¶
Overview ¶
Package hostsetup links remote machines to an instance: it edits the config file in place (keeping comments) and checks and prepares the machine over SSH. The CLI wizard (`runner-warden host add`) drives it.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddHost ¶
AddHost returns the config text with h appended, its OS section enabled, and its OS added to every [[target]] h serves. Comments and layout stay.
func KeepaliveTask ¶
KeepaliveTask is the Windows scheduled task that keeps a WSL distro up.
Types ¶
type Check ¶
type Check struct {
Name string
OK bool
Detail string
Fix func(ctx context.Context) error
FixMsg string // what Fix does, for the question
}
Check is one finding about a machine. Fix, when set, is a step the wizard can run for the operator (after asking).
func LinuxChecks ¶
LinuxChecks inspects a Linux machine (or WSL distro) reached through exec: root, systemd, Docker Engine.
type Commander ¶
type Commander interface {
Command(ctx context.Context, cmd, stdin string) (stdout, stderr string, exit int, err error)
}
Commander runs a command line on the machine with stdin (an SSH session).
type Host ¶
type Host struct {
Kind Kind
Name string
Address string
SSHUser string
Targets []string
MaxConcurrent int // linux, wsl, windows
Exec string // linux, wsl
VM string // macos
GuestUID int // macos
}
Host is everything the config needs for one machine.
type Kind ¶
type Kind string
Kind is the type of machine being linked.