hypervisors

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HvtVmm    VmmType = "hvt"
	HvtBinary string  = "solo5-hvt"
)
View Source
const (
	QemuVmm    VmmType = "qemu"
	QemuBinary string  = "qemu-system-"
)

Variables

View Source
var ErrVMMNotInstalled = errors.New("vmm not found")

Functions

This section is empty.

Types

type ExecArgs

type ExecArgs struct {
	Container     string   // The container ID
	UnikernelPath string   // The path of the unikernel inside rootfs
	TapDevice     string   // The TAP device name
	BlockDevice   string   // The block device path
	Command       string   // The unikernel's command line
	IPAddress     string   // The IP address of the TAP device
	Environment   []string // Environment
}

ExecArgs holds the data required by Execve to start the VMM FIXME: add extra fields if required by additional VMM's

type HVT

type HVT struct {
	// contains filtered or unexported fields
}

func (*HVT) Execve

func (h *HVT) Execve(args ExecArgs) error

func (*HVT) Ok

func (h *HVT) Ok() error

Ok checks if the hvt binary is available in the system's PATH.

func (*HVT) Path

func (h *HVT) Path() string

Path returns the path to the hvt binary.

func (*HVT) Stop

func (h *HVT) Stop(_ string) error

Stop is an empty function to satisfy VMM interface compatibility requirements. It does not perform any actions and always returns nil.

type Hedge

type Hedge struct{}

func (*Hedge) Execve

func (h *Hedge) Execve(_ ExecArgs) error

func (*Hedge) Ok

func (h *Hedge) Ok() error

func (*Hedge) Path

func (h *Hedge) Path() string

func (*Hedge) Stop

func (h *Hedge) Stop(t string) error

func (*Hedge) VMState

func (h *Hedge) VMState(name string) string

type Qemu

type Qemu struct {
	// contains filtered or unexported fields
}

func (*Qemu) Execve

func (q *Qemu) Execve(_ ExecArgs) error

func (*Qemu) Ok

func (q *Qemu) Ok() error

func (*Qemu) Path

func (q *Qemu) Path() string

func (*Qemu) Stop

func (q *Qemu) Stop(_ string) error

type VMM

type VMM interface {
	Execve(args ExecArgs) error
	Stop(t string) error
	Path() string
	Ok() error
}

func NewVMM

func NewVMM(vmmType VmmType) (vmm VMM, err error)

type VmmType

type VmmType string
const (
	HedgeVmm VmmType = "hedge"

	ConsoleEndpoint = "/proc/vmcons"
)

Jump to

Keyboard shortcuts

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