Documentation
¶
Overview ¶
Package hypervisor finds local VMs and their current SSH address through each hypervisor's own CLI, so a devbox's Host block need not carry an IP that changes on every boot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotSupported = errors.New("not supported by this hypervisor's CLI")
ErrNotSupported means the hypervisor's CLI cannot do this without more than authama has (VMware runs guest commands only with guest credentials).
var ErrOwnKeys = errors.New("this hypervisor manages its own SSH access and keys")
ErrOwnKeys means the hypervisor runs its own SSH access and keys (OrbStack, Podman): authama lists the machine and can point a Docker context at it, but does not take its keys over.
Functions ¶
Types ¶
type Driver ¶
type Driver interface {
Name() string
// CLI is the command the driver runs, "" when it cannot be found.
CLI() string
List() ([]VM, error)
Address(vm string) (Endpoint, error)
Start(vm string) error
// Exec runs argv inside the VM (for installing a key without SSH); ErrNotSupported or ErrOwnKeys
// when the CLI cannot.
Exec(vm string, argv ...string) ([]byte, error)
}
Driver is one hypervisor.