Documentation
¶
Overview ¶
Package vmstate tracks running winkit VMs via JSON state files. Each VM gets a file named <name>.json in a state directory (default ~/.winkit/run/).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDir ¶
func DefaultDir() string
DefaultDir returns the default state directory (~/.winkit/run/).
Types ¶
type State ¶
type State struct {
Name string `json:"name"`
ImagePath string `json:"image_path"`
PID int `json:"pid"`
Backend string `json:"backend"`
StartedAt time.Time `json:"started_at"`
SSHPort uint16 `json:"ssh_port,omitempty"`
RDPPort uint16 `json:"rdp_port,omitempty"`
VNCPort uint16 `json:"vnc_port,omitempty"`
// Forwards are the extra host:guest TCP forwards the VM was started with.
Forwards []string `json:"forwards,omitempty"`
Accel string `json:"accel,omitempty"`
OutputDir string `json:"output_dir,omitempty"`
}
State describes a running VM.
func FindByImage ¶
FindByImage returns the first state whose ImagePath matches path, or nil.
Click to show internal directories.
Click to hide internal directories.