types

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 23, 2025 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockDevParams

type BlockDevParams struct {
	Source     string
	MountPoint string
	FsType     string
	ID         string
}

type ExecArgs

type ExecArgs struct {
	ContainerID   string   // The container ID
	Environment   []string // The environment variables of the monitor
	Command       string   // The unikernel's command line
	Seccomp       bool     // Enable or disable seccomp filters for the VMM
	MemSizeB      uint64   // The size of the memory provided to the VM in bytes
	VCPUs         uint     // The number of vCPUs to allocate
	UnikernelPath string   // The path of the unikernel inside rootfs
	InitrdPath    string   // The path to the initrd of the unikernel
	VAccelType    string   // Specifies the vAccel acceleration type(e.g. vsock). When empty, vAccel is disabled
	VSockDevPath  string   // The host directory where the fc unix socket is created
	VSockDevID    int      // The guest-cid
	Net           NetDevParams
	Sharedfs      SharedfsParams
}

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

type ExtraBinConfig

type ExtraBinConfig struct {
	Path    string `toml:"path"`              // The path to the binary
	Options string `toml:"options,omitempty"` // Optional cli options for the extra binary
}

ExtraBinConfig struct is used to hold specific configuration for extra binaries like virtiofsd. It is parsed from the urunc config file or state.json annotations

type MonitorBlockArgs

type MonitorBlockArgs struct {
	ID        string
	Path      string
	ExactArgs string
}

type MonitorCliArgs

type MonitorCliArgs struct {
	ExtraInitrd string
	OtherArgs   string
}

type MonitorConfig

type MonitorConfig struct {
	DefaultMemoryMB uint   `toml:"default_memory_mb"`
	DefaultVCPUs    uint   `toml:"default_vcpus"`
	BinaryPath      string `toml:"path,omitempty"`      // Optional path to the hypervisor binary
	DataPath        string `toml:"data_path,omitempty"` // Optional path to the hypervisor data files (e.g. qemu bios stuff)
}

MonitorConfig struct is used to hold hypervisor specific configuration that is parsed from the urunc config file or state.json annotations

type NetDevParams

type NetDevParams struct {
	IP      string // The veth device IP
	Mask    string // The veth device mask
	Gateway string // The veth device gateway
	MAC     string // The MAC address of the guest network device
	TapDev  string // The tap device name
}

type ProcessConfig

type ProcessConfig struct {
	UID     uint32 // The uid of the process inside the guest
	GID     uint32 // The gid of the process inside the guest
	WorkDir string // The workdir of the process inside the guest
}

Specific to Linux

type RootfsParams

type RootfsParams struct {
	Type        string // The type of rootfs (block, initrd, 9pfs, virtiofs)
	Path        string // The path in the host where rootfs resides
	MountedPath string // The mountpoint in the host where the rootfs is mounted
	MonRootfs   string // The rootfs for the monitor process
}

type SharedfsParams

type SharedfsParams struct {
	Type string // The type of shared-fs 9p or virtiofs
	Path string // The path in the host to share with guest
}

type Unikernel

type Unikernel interface {
	Init(UnikernelParams) error
	CommandString() (string, error)
	SupportsBlock() bool
	SupportsFS(string) bool
	MonitorNetCli(string, string) string
	MonitorBlockCli() []MonitorBlockArgs
	MonitorCli() MonitorCliArgs
}

type UnikernelParams

type UnikernelParams struct {
	CmdLine    []string // The cmdline provided by the image
	EnvVars    []string // The environment variables provided by the image
	Monitor    string   // The monitor where guest will execute
	Version    string   // The version of the unikernel
	InitrdPath string   // The path to the initrd of the unikernel
	Net        NetDevParams
	Block      []BlockDevParams
	Rootfs     RootfsParams  // Information about rootfs
	ProcConf   ProcessConfig // Information for the process execution inside the guest
}

UnikernelParams holds the data required to build the unikernels commandline

type VMM

type VMM interface {
	Execve(args ExecArgs, ukernel Unikernel) error
	Stop(int) error
	Path() string
	UsesKVM() bool
	SupportsSharedfs(string) bool
	Ok() error
}

Jump to

Keyboard shortcuts

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