unikernels

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: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	LinuxUnikernel string = "linux"
)
View Source
const MewzUnikernel string = "mewz"
View Source
const MirageUnikernel string = "mirage"
View Source
const RumprunUnikernel string = "rumprun"
View Source
const SubnetMask125 = "128.0.0.0"
View Source
const UnikraftCompatVersion string = "0.16.1"
View Source
const UnikraftUnikernel string = "unikraft"

Variables

View Source
var ErrNotSupportedUnikernel = errors.New("unikernel is not supported")
View Source
var ErrUndefinedVersion = errors.New("version is undefined, using default version")
View Source
var ErrVersionParsing = errors.New("failed to parse provided version, using default version")

Functions

func IsIPInSubnet

func IsIPInSubnet(ln LinuxNet) bool

func New

func New(unikernelType string) (types.Unikernel, error)

Types

type Linux

type Linux struct {
	App        string
	Command    string
	Monitor    string
	Env        []string
	Net        LinuxNet
	Blk        []types.BlockDevParams
	RootFsType string
	InitrdConf bool
	ProcConfig types.ProcessConfig
}

func (*Linux) CommandString

func (l *Linux) CommandString() (string, error)

func (*Linux) Init

func (l *Linux) Init(data types.UnikernelParams) error

func (*Linux) MonitorBlockCli

func (l *Linux) MonitorBlockCli() []types.MonitorBlockArgs

func (*Linux) MonitorCli

func (l *Linux) MonitorCli() types.MonitorCliArgs

func (*Linux) MonitorNetCli

func (l *Linux) MonitorNetCli(_ string, _ string) string

func (*Linux) SupportsBlock

func (l *Linux) SupportsBlock() bool

func (*Linux) SupportsFS

func (l *Linux) SupportsFS(fsType string) bool

type LinuxNet

type LinuxNet struct {
	Address string
	Gateway string
	Mask    string
}

type Mewz

type Mewz struct {
	Command string
	Monitor string
	Net     MewzNet
}

func (*Mewz) CommandString

func (m *Mewz) CommandString() (string, error)

func (*Mewz) Init

func (m *Mewz) Init(data types.UnikernelParams) error

func (*Mewz) MonitorBlockCli

func (m *Mewz) MonitorBlockCli() []types.MonitorBlockArgs

Mewz does not seem to support virtio block or anu other kind of block/fs.

func (*Mewz) MonitorCli

func (m *Mewz) MonitorCli() types.MonitorCliArgs

Mewz does not require any monitor specific cli option

func (*Mewz) MonitorNetCli

func (m *Mewz) MonitorNetCli(ifName string, mac string) string

func (*Mewz) SupportsBlock

func (m *Mewz) SupportsBlock() bool

func (*Mewz) SupportsFS

func (m *Mewz) SupportsFS(_ string) bool

type MewzNet

type MewzNet struct {
	Address string
	Mask    int
	Gateway string
}

type Mirage

type Mirage struct {
	Command string
	Monitor string
	Net     MirageNet
	Block   []MirageBlock
}

func (*Mirage) CommandString

func (m *Mirage) CommandString() (string, error)

func (*Mirage) Init

func (m *Mirage) Init(data types.UnikernelParams) error

func (*Mirage) MonitorBlockCli

func (m *Mirage) MonitorBlockCli() []types.MonitorBlockArgs

func (*Mirage) MonitorCli

func (m *Mirage) MonitorCli() types.MonitorCliArgs

func (*Mirage) MonitorNetCli

func (m *Mirage) MonitorNetCli(ifName string, mac string) string

func (*Mirage) SupportsBlock

func (m *Mirage) SupportsBlock() bool

func (*Mirage) SupportsFS

func (m *Mirage) SupportsFS(_ string) bool

type MirageBlock

type MirageBlock struct {
	ID       string
	HostPath string
}

type MirageNet

type MirageNet struct {
	Address string
	Gateway string
}

type Rumprun

type Rumprun struct {
	Command string
	Monitor string
	Envs    []string
	Net     RumprunNet
	Blk     RumprunBlk
}

func (*Rumprun) CommandString

func (r *Rumprun) CommandString() (string, error)

func (*Rumprun) Init

func (r *Rumprun) Init(data types.UnikernelParams) error

func (*Rumprun) MonitorBlockCli

func (r *Rumprun) MonitorBlockCli() []types.MonitorBlockArgs

func (*Rumprun) MonitorCli

func (r *Rumprun) MonitorCli() types.MonitorCliArgs

Rumprun can execute only on top of Solo5 and currently there are no generic Solo5-specific arguments that Rumprun requires

func (*Rumprun) MonitorNetCli

func (r *Rumprun) MonitorNetCli(ifName string, mac string) string

func (*Rumprun) SupportsBlock

func (r *Rumprun) SupportsBlock() bool

func (*Rumprun) SupportsFS

func (r *Rumprun) SupportsFS(fsType string) bool

type RumprunBlk

type RumprunBlk struct {
	HostPath   string `json:"-"`
	Source     string `json:"source"`
	Path       string `json:"path"`
	FsType     string `json:"fstype"`
	Mountpoint string `json:"mountpoint"`
}

type RumprunCmd

type RumprunCmd struct {
	CmdLine string `json:"cmdline"`
}

type RumprunEnv

type RumprunEnv struct {
	Env string `json:"env"`
}

type RumprunNet

type RumprunNet struct {
	Interface string `json:"if"`
	Cloner    string `json:"cloner"`
	Type      string `json:"type"`
	Method    string `json:"method"`
	Address   string `json:"addr"`
	Mask      string `json:"mask"`
	Gateway   string `json:"gw"`
}

type Unikraft

type Unikraft struct {
	AppName string
	Monitor string
	Command string
	Env     []string
	Net     UnikraftNet
	VFS     UnikraftVFS
	Version string
}

func (*Unikraft) CommandString

func (u *Unikraft) CommandString() (string, error)

func (*Unikraft) Init

func (u *Unikraft) Init(data types.UnikernelParams) error

func (*Unikraft) MonitorBlockCli

func (u *Unikraft) MonitorBlockCli() []types.MonitorBlockArgs

We have not managed to make Unikraft run with block yet.

func (*Unikraft) MonitorCli

func (u *Unikraft) MonitorCli() types.MonitorCliArgs

There are no generic CLI hypervisor options for Unikraft yet.

func (*Unikraft) MonitorNetCli

func (u *Unikraft) MonitorNetCli(_ string, _ string) string

There is no need for any changes here yet.

func (*Unikraft) SupportsBlock

func (u *Unikraft) SupportsBlock() bool

func (*Unikraft) SupportsFS

func (u *Unikraft) SupportsFS(fsType string) bool

type UnikraftNet

type UnikraftNet struct {
	Address string
	Mask    string
	Gateway string
}

type UnikraftVFS

type UnikraftVFS struct {
	RootFS string
}

Jump to

Keyboard shortcuts

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