vfkit

package
v5.0.2 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Rendered for darwin/amd64

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToMachineStatus

func ToMachineStatus(val string) (define.Status, error)

Types

type Endpoint

type Endpoint string

type VZMachineState

type VZMachineState string

VZMachineState is what the restful service in vfkit will return

const (
	// Values that the machine can be in
	// "VirtualMachineStateStoppedVirtualMachineStateRunningVirtualMachineStatePausedVirtualMachineStateErrorVirtualMachineStateStartingVirtualMachineStatePausingVirtualMachineStateResumingVirtualMachineStateStopping"
	VZMachineStateStopped  VZMachineState = "VirtualMachineStateStopped"
	VZMachineStateRunning  VZMachineState = "VirtualMachineStateRunning"
	VZMachineStatePaused   VZMachineState = "VirtualMachineStatePaused"
	VZMachineStateError    VZMachineState = "VirtualMachineStateError"
	VZMachineStateStarting VZMachineState = "VirtualMachineStateStarting"
	VZMachineStatePausing  VZMachineState = "VirtualMachineStatePausing"
	VZMachineStateResuming VZMachineState = "VirtualMachineStateResuming"
	VZMachineStateStopping VZMachineState = "VirtualMachineStateStopping"
)

type VfkitHelper

type VfkitHelper struct {
	LogLevel        logrus.Level
	Endpoint        string
	VfkitBinaryPath *define.VMFile
	VirtualMachine  *config.VirtualMachine
}

VfkitHelper describes the use of vfkit: cmdline and endpoint

func (*VfkitHelper) State

func (vf *VfkitHelper) State() (define.Status, error)

state asks vfkit for the virtual machine state. in case the vfkit service is not responding, we assume the service is not running and return a stopped status

func (*VfkitHelper) Stop

func (vf *VfkitHelper) Stop(force, wait bool) error

Jump to

Keyboard shortcuts

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