Documentation
¶
Index ¶
- Constants
- type Container
- type ContainerState
- type ContainerStatus
- type ExecAction
- type MacOSVirtualMachine
- func (m *MacOSVirtualMachine) Env() []corev1.EnvVar
- func (m *MacOSVirtualMachine) Error() error
- func (m *MacOSVirtualMachine) FinishedAt() *time.Time
- func (m *MacOSVirtualMachine) IPAddress() string
- func (m *MacOSVirtualMachine) Instance() *vm.VirtualMachineInstance
- func (m *MacOSVirtualMachine) SetError(err error)
- func (m *MacOSVirtualMachine) SetInstance(instance *vm.VirtualMachineInstance)
- func (m *MacOSVirtualMachine) StartedAt() *time.Time
- func (m *MacOSVirtualMachine) State() VirtualMachineState
- type VirtualMachine
- type VirtualMachineState
Constants ¶
const ( // MacOSRuntime is the runtime name for macOS virtual machines. MacOSRuntime = "vz" // ContainerRuntime is the runtime name for containerized workloads. ContainerRuntime = "docker" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Container ¶
type Container struct { ID string Name string State ContainerState }
Container represents a single container with its ID, name, and state.
type ContainerState ¶
type ContainerState struct { Status ContainerStatus StartedAt time.Time FinishedAt time.Time ExitCode int Error string }
ContainerState holds information about the current and past state of a container.
type ContainerStatus ¶
type ContainerStatus int
ContainerStatus represents the status of a container.
const ( // Container is waiting to be created. ContainerStatusWaiting ContainerStatus = iota // Container has been created ContainerStatusCreated // Container is currently running ContainerStatusRunning // Container has been paused ContainerStatusPaused // Container is in the process of restarting. ContainerStatusRestarting // Container was killed due to an out-of-memory condition. ContainerStatusOOMKilled // Container has terminated. ContainerStatusDead // Container status is unknown. ContainerStatusUnknown )
type ExecAction ¶
type MacOSVirtualMachine ¶
type MacOSVirtualMachine struct {
// contains filtered or unexported fields
}
MacOSVirtualMachine represents a macOS virtual machine instance along with its error state.
func NewMacOSVirtualMachine ¶
func NewMacOSVirtualMachine(env []corev1.EnvVar) MacOSVirtualMachine
NewMacOSVirtualMachine creates a new instance of MacOSVirtualMachine.
func (*MacOSVirtualMachine) Env ¶
func (m *MacOSVirtualMachine) Env() []corev1.EnvVar
Environment returns the environment variables for the macOS virtual machine.
func (*MacOSVirtualMachine) Error ¶
func (m *MacOSVirtualMachine) Error() error
Error returns the error state of the macOS virtual machine.
func (*MacOSVirtualMachine) FinishedAt ¶
func (m *MacOSVirtualMachine) FinishedAt() *time.Time
FinishedAt returns the finish time of the macOS virtual machine.
func (*MacOSVirtualMachine) IPAddress ¶
func (m *MacOSVirtualMachine) IPAddress() string
IPAddress returns the IP address of the macOS virtual machine.
func (*MacOSVirtualMachine) Instance ¶
func (m *MacOSVirtualMachine) Instance() *vm.VirtualMachineInstance
Instance returns the internal VirtualMachineInstance.
func (*MacOSVirtualMachine) SetError ¶
func (m *MacOSVirtualMachine) SetError(err error)
SetError sets the error state of the macOS virtual machine.
func (*MacOSVirtualMachine) SetInstance ¶
func (m *MacOSVirtualMachine) SetInstance(instance *vm.VirtualMachineInstance)
SetInstance sets the internal VirtualMachineInstance.
func (*MacOSVirtualMachine) StartedAt ¶
func (m *MacOSVirtualMachine) StartedAt() *time.Time
StartedAt returns the start time of the macOS virtual machine.
func (*MacOSVirtualMachine) State ¶
func (m *MacOSVirtualMachine) State() VirtualMachineState
State returns the current state of the macOS virtual machine.
type VirtualMachine ¶
type VirtualMachine interface { // Env returns the environment variables for the virtual machine. Env() []corev1.EnvVar // State returns the current state of the virtual machine. State() VirtualMachineState // Error returns the error state of the virtual machine. Error() error // SetError sets the error state of the virtual machine. SetError(err error) // IPAddress returns the IP address of the virtual machine. IPAddress() string // StartedAt returns the start time of the virtual machine. StartedAt() *time.Time // FinishedAt returns the finish time of the virtual machine. FinishedAt() *time.Time }
type VirtualMachineState ¶
type VirtualMachineState int
VirtualMachineState represents the state of a macOS virtual machine.
const ( // VM is preparing. VirtualMachineStatePreparing VirtualMachineState = iota // VM is starting. VirtualMachineStateStarting // VM is running. VirtualMachineStateRunning // VM is terminating. VirtualMachineStateTerminating // VM has terminated. VirtualMachineStateTerminated // VM has failed. VirtualMachineStateFailed )