Documentation ¶
Index ¶
- func CreateVM(state *globalState, createVM CreateVMStruct) error
- func ForceRestartVM(state *globalState, name string) error
- func ForceStopVM(state *globalState, name string) error
- func GetRouter(state *globalState) chi.Router
- func RestartVM(state *globalState, name string) error
- func Run()
- func StartVM(state *globalState, name string) error
- func StopVM(state *globalState, name string) error
- type Config
- type CreateVMStruct
- type VM
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateVM ¶
func CreateVM(state *globalState, createVM CreateVMStruct) error
CreateVM createds a virtual machine
func ForceRestartVM ¶
ForceRestartVM forcefully restarts/resets a VM, like pressing the reset button on a real PC
func ForceStopVM ¶
ForceStopVM forcefully stops a VM, like pressing the power button on a real PC
Types ¶
type Config ¶
Config is the structure of the config file on disk
func LoadConfig ¶
LoadConfig loads configuration from file or environment variables
type CreateVMStruct ¶
type CreateVMStruct struct { // Generated ID string MACAddress string // Provided by API Name string Hostname string RAMMB uint DiskSpaceGB uint Image string IPAddress string // Set in config file SSHKey string Gateway string Netmask string }
CreateVMStruct struct for the CreateVM call
Click to show internal directories.
Click to hide internal directories.