unikernels

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotSupportedUnikernel = errors.New("unikernel is not supported")

Functions

func UnikernelCommand

func UnikernelCommand(unikernelType UnikernelType, data UnikernelParams) (string, error)

Types

type Rumprun

type Rumprun struct {
	Command string     `json:"cmdline"`
	Net     RumprunNet `json:"net"`
	Blk     RumprunBlk `json:"blk"`
}

func (Rumprun) CommandString

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

type RumprunBlk

type RumprunBlk struct {
	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 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 RumprunNoNet

type RumprunNoNet struct {
	Command string     `json:"cmdline"`
	Blk     RumprunBlk `json:"blk"`
}

type Unikernel

type Unikernel interface {
	CommandString() (string, error)
}

type UnikernelParams

type UnikernelParams struct {
	CmdLine          string // The cmdline provided by the image
	EthDeviceIP      string // The eth device IP
	EthDeviceMask    string // The eth device mask
	EthDeviceGateway string // The eth device gateway
}

UnikernelParams holds the data required to build the unikernels commandline

type UnikernelType

type UnikernelType string
const RumprunUnikernel UnikernelType = "rumprun"

Jump to

Keyboard shortcuts

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