Documentation
¶
Index ¶
- Constants
- Variables
- func BytesToStringMB(argMem uint64) string
- func NewVMM(vmmType VmmType, monitors map[string]types.MonitorConfig) (vmm types.VMM, err error)
- type CloudHypervisor
- func (ch *CloudHypervisor) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel) ([]string, error)
- func (ch *CloudHypervisor) Ok() error
- func (ch *CloudHypervisor) Path() string
- func (ch *CloudHypervisor) PreExec(_ types.ExecArgs) error
- func (ch *CloudHypervisor) Signal(pid int, signal unix.Signal) error
- func (ch *CloudHypervisor) Stop(pid int) error
- func (ch *CloudHypervisor) SupportsSharedfs(fsType string) bool
- func (ch *CloudHypervisor) UsesKVM() bool
- type Firecracker
- func (fc *Firecracker) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel) ([]string, error)
- func (fc *Firecracker) Ok() error
- func (fc *Firecracker) Path() string
- func (fc *Firecracker) PreExec(_ types.ExecArgs) error
- func (fc *Firecracker) Signal(pid int, signal unix.Signal) error
- func (fc *Firecracker) Stop(pid int) error
- func (fc *Firecracker) SupportsSharedfs(_ string) bool
- func (fc *Firecracker) UsesKVM() bool
- type FirecrackerBootSource
- type FirecrackerConfig
- type FirecrackerDrive
- type FirecrackerMachine
- type FirecrackerNet
- type FirecrackerVSockDev
- type HVT
- func (h *HVT) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel) ([]string, error)
- func (h *HVT) Ok() error
- func (h *HVT) Path() string
- func (h *HVT) PreExec(args types.ExecArgs) error
- func (h *HVT) Signal(pid int, signal unix.Signal) error
- func (h *HVT) Stop(pid int) error
- func (h *HVT) SupportsSharedfs(_ string) bool
- func (h *HVT) UsesKVM() bool
- type Hedge
- func (h *Hedge) BuildExecCmd(_ types.ExecArgs, _ types.Unikernel) ([]string, error)
- func (h *Hedge) Ok() error
- func (h *Hedge) Path() string
- func (h *Hedge) PreExec(_ types.ExecArgs) error
- func (h *Hedge) Signal(_ int, _ unix.Signal) error
- func (h *Hedge) Stop(_ int) error
- func (h *Hedge) SupportsSharedfs(_ string) bool
- func (h *Hedge) UsesKVM() bool
- func (h *Hedge) VMState(name string) string
- type Hyperlight
- func (h *Hyperlight) BuildExecCmd(args types.ExecArgs, _ types.Unikernel) ([]string, error)
- func (h *Hyperlight) Ok() error
- func (h *Hyperlight) Path() string
- func (h *Hyperlight) PreExec(_ types.ExecArgs) error
- func (h *Hyperlight) Signal(pid int, signal unix.Signal) error
- func (h *Hyperlight) Stop(pid int) error
- func (h *Hyperlight) SupportsSharedfs(_ string) bool
- func (h *Hyperlight) UsesKVM() bool
- type Qemu
- func (q *Qemu) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel) ([]string, error)
- func (q *Qemu) Ok() error
- func (q *Qemu) Path() string
- func (q *Qemu) PreExec(_ types.ExecArgs) error
- func (q *Qemu) Signal(pid int, signal unix.Signal) error
- func (q *Qemu) Stop(pid int) error
- func (q *Qemu) SupportsSharedfs(_ string) bool
- func (q *Qemu) UsesKVM() bool
- type SPT
- func (s *SPT) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel) ([]string, error)
- func (s *SPT) Ok() error
- func (s *SPT) Path() string
- func (s *SPT) PreExec(_ types.ExecArgs) error
- func (s *SPT) Signal(pid int, signal unix.Signal) error
- func (s *SPT) Stop(pid int) error
- func (s *SPT) SupportsSharedfs(_ string) bool
- func (s *SPT) UsesKVM() bool
- type VMMFactory
- type VmmType
Constants ¶
const ( CloudHypervisorVmm VmmType = "cloud-hypervisor" CloudHypervisorBinary string = "cloud-hypervisor" )
const ( FirecrackerVmm VmmType = "firecracker" FirecrackerBinary string = "firecracker" FCJsonFilename string = "fc.json" )
const ( HvtVmm VmmType = "hvt" HvtBinary string = "solo5-hvt" )
const ( HyperlightVmm VmmType = "hyperlight-unikraft" HyperlightBinary string = "hyperlight-unikraft" )
const ( QemuVmm VmmType = "qemu" QemuBinary string = "qemu-system-" )
const ( SptVmm VmmType = "spt" SptBinary string = "solo5-spt" )
const DefaultMemory uint64 = 256 // The default memory for every hypervisor: 256 MB
Variables ¶
var ErrVMMNotInstalled = errors.New("vmm not found")
Functions ¶
func BytesToStringMB ¶
Types ¶
type CloudHypervisor ¶ added in v0.8.0
type CloudHypervisor struct {
// contains filtered or unexported fields
}
func (*CloudHypervisor) BuildExecCmd ¶ added in v0.8.0
func (ch *CloudHypervisor) BuildExecCmd(args types.ExecArgs, ukernel types.Unikernel) ([]string, error)
BuildExecCmd builds and validates the Cloud Hypervisor command arguments without executing.
func (*CloudHypervisor) Ok ¶ added in v0.8.0
func (ch *CloudHypervisor) Ok() error
func (*CloudHypervisor) Path ¶ added in v0.8.0
func (ch *CloudHypervisor) Path() string
func (*CloudHypervisor) PreExec ¶ added in v0.8.0
func (ch *CloudHypervisor) PreExec(_ types.ExecArgs) error
PreExec performs pre-execution setup. Cloud Hypervisor has no special pre-exec requirements.
func (*CloudHypervisor) Signal ¶ added in v0.8.0
func (ch *CloudHypervisor) Signal(pid int, signal unix.Signal) error
func (*CloudHypervisor) Stop ¶ added in v0.8.0
func (ch *CloudHypervisor) Stop(pid int) error
func (*CloudHypervisor) SupportsSharedfs ¶ added in v0.8.0
func (ch *CloudHypervisor) SupportsSharedfs(fsType string) bool
SupportsSharedfs returns true as Cloud Hypervisor supports virtiofs
func (*CloudHypervisor) UsesKVM ¶ added in v0.8.0
func (ch *CloudHypervisor) UsesKVM() bool
UsesKVM returns true as Cloud Hypervisor is a KVM-based VMM
type Firecracker ¶
type Firecracker struct {
// contains filtered or unexported fields
}
func (*Firecracker) BuildExecCmd ¶ added in v0.8.0
func (*Firecracker) Ok ¶
func (fc *Firecracker) Ok() error
func (*Firecracker) Path ¶
func (fc *Firecracker) Path() string
func (*Firecracker) PreExec ¶ added in v0.8.0
func (fc *Firecracker) PreExec(_ types.ExecArgs) error
PreExec performs pre-execution setup. Firecracker has no special pre-exec requirements.
func (*Firecracker) Signal ¶ added in v0.8.0
func (fc *Firecracker) Signal(pid int, signal unix.Signal) error
func (*Firecracker) Stop ¶
func (fc *Firecracker) Stop(pid int) error
func (*Firecracker) SupportsSharedfs ¶
func (fc *Firecracker) SupportsSharedfs(_ string) bool
SupportsSharedfs returns a bool value depending on the monitor support for shared-fs
func (*Firecracker) UsesKVM ¶
func (fc *Firecracker) UsesKVM() bool
type FirecrackerBootSource ¶
type FirecrackerConfig ¶
type FirecrackerConfig struct {
Source FirecrackerBootSource `json:"boot-source"`
Machine FirecrackerMachine `json:"machine-config"`
Drives []FirecrackerDrive `json:"drives"`
NetIfs []FirecrackerNet `json:"network-interfaces,omitempty"`
VSock FirecrackerVSockDev `json:"vsock,omitempty"`
}
type FirecrackerDrive ¶
type FirecrackerMachine ¶
type FirecrackerNet ¶
type FirecrackerVSockDev ¶
type HVT ¶
type HVT struct {
// contains filtered or unexported fields
}
func (*HVT) BuildExecCmd ¶ added in v0.8.0
func (*HVT) PreExec ¶ added in v0.8.0
PreExec performs pre-execution setup for HVT. HVT requires applying seccomp filters before syscall.Exec if Seccomp is enabled.
func (*HVT) SupportsSharedfs ¶
SupportsSharedfs returns a bool value depending on the monitor support for shared-fs
type Hedge ¶
type Hedge struct{}
func (*Hedge) BuildExecCmd ¶ added in v0.8.0
func (*Hedge) PreExec ¶ added in v0.8.0
PreExec performs pre-execution setup. Hedge is not fully implemented.
func (*Hedge) SupportsSharedfs ¶
SupportsSharedfs returns a bool value depending on the monitor support for shared-fs
type Hyperlight ¶ added in v0.8.0
type Hyperlight struct {
// contains filtered or unexported fields
}
func (*Hyperlight) BuildExecCmd ¶ added in v0.8.0
BuildExecCmd constructs the hyperlight-unikraft command line.
func (*Hyperlight) Ok ¶ added in v0.8.0
func (h *Hyperlight) Ok() error
Ok checks if the hyperlight-unikraft binary is available. Binary availability is already verified by getVMMPath via exec.LookPath.
func (*Hyperlight) Path ¶ added in v0.8.0
func (h *Hyperlight) Path() string
Path returns the path to the hyperlight binary.
func (*Hyperlight) PreExec ¶ added in v0.8.0
func (h *Hyperlight) PreExec(_ types.ExecArgs) error
PreExec performs pre-execution setup. Hyperlight has no special pre-exec requirements.
func (*Hyperlight) Signal ¶ added in v0.8.0
func (h *Hyperlight) Signal(pid int, signal unix.Signal) error
func (*Hyperlight) Stop ¶ added in v0.8.0
func (h *Hyperlight) Stop(pid int) error
Stop kills the hyperlight process
func (*Hyperlight) SupportsSharedfs ¶ added in v0.8.0
func (h *Hyperlight) SupportsSharedfs(_ string) bool
SupportsSharedfs returns a bool value depending on the monitor support for shared-fs
func (*Hyperlight) UsesKVM ¶ added in v0.8.0
func (h *Hyperlight) UsesKVM() bool
UsesKVM returns a bool value depending on if the monitor uses KVM
type Qemu ¶
type Qemu struct {
// contains filtered or unexported fields
}
func (*Qemu) BuildExecCmd ¶ added in v0.8.0
func (*Qemu) PreExec ¶ added in v0.8.0
PreExec performs pre-execution setup. QEMU has no special pre-exec requirements.
func (*Qemu) SupportsSharedfs ¶
SupportsSharedfs returns a bool value depending on the monitor support for shared-fs
type SPT ¶
type SPT struct {
// contains filtered or unexported fields
}
func (*SPT) BuildExecCmd ¶ added in v0.8.0
func (*SPT) PreExec ¶ added in v0.8.0
PreExec performs pre-execution setup. SPT has no special pre-exec requirements.
func (*SPT) SupportsSharedfs ¶
SupportsSharedfs returns a bool value depending on the monitor support for shared-fs
type VMMFactory ¶
type VMMFactory struct {
// contains filtered or unexported fields
}