firecracker

package
v0.0.0-...-79a645e Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2022 License: Apache-2.0 Imports: 29 Imported by: 0

Documentation

Index

Constants

View Source
const DownloadPath = "https://downloads.vorteil.io/firecracker-vmlinux/"

DownloadPath is the path where we pull firecracker-vmlinux's from

Variables

View Source
var Allocator virtualizers.VirtualizerAllocator = &allocator{}

Allocator for Firecracker

View Source
var VirtualizerID = "firecracker"

VirtualizerID is a unique identifier for Firecracker

Functions

func Create

func Create(mgr *virtualizers.Manager, name string) error

Create creates a virtualizer using the provided manager

func FetchBridgeDevice

func FetchBridgeDevice() error

FetchBridgeDevice check if the bridge exists

func SetupBridge

func SetupBridge(log elog.View, ip string) error

SetupBridgeAndDHCPServer creates the bridge which provides DHCP addresses todo firecracker instances.

Types

type Config

type Config struct{}

Config to run the virtualizer

func (*Config) Marshal

func (c *Config) Marshal() []byte

Marshal the config into a byte[]

func (*Config) Unmarshal

func (c *Config) Unmarshal(data []byte) error

Unmarshal the byte[] array into a config struct

type Virtualizer

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

Virtualizer is a struct which will implement the interface so the manager can control it

func (*Virtualizer) Close

func (v *Virtualizer) Close(force bool) error

Close shuts down the virtual machine and cleans up the disk and folders

func (*Virtualizer) Details

func (v *Virtualizer) Details() (string, string, string, []virtualizers.NetworkInterface, time.Time, *vcfg.VCFG, interface{})

Details returns data to for the ConverToVM function on util

func (*Virtualizer) Download

func (v *Virtualizer) Download() (vio.File, error)

Download returns the disk

func (*Virtualizer) Initialize

func (v *Virtualizer) Initialize(data []byte) error

Initialize passes the arguments from creation to create a virtualizer. No arguments apart from name so no need to do anything

func (*Virtualizer) Prepare

Prepare prepares the virtualizer with the appropriate fields to run the virtualizer

func (*Virtualizer) Serial

func (v *Virtualizer) Serial() *logger.Logger

Serial returns the serial logger which contains the serial output of the application

func (*Virtualizer) Start

func (v *Virtualizer) Start() error

Start create the virtualmachine and runs it

func (*Virtualizer) State

func (v *Virtualizer) State() string

State returns the state of the virtual machine

func (*Virtualizer) Stop

func (v *Virtualizer) Stop() error

Stop stops the vm and changes it back to ready

func (*Virtualizer) Type

func (v *Virtualizer) Type() string

Type returns the type of virtualizer

func (*Virtualizer) Write

func (v *Virtualizer) Write(d []byte) (n int, err error)

Write method to handle logging from firecracker to use our logger interface Cant use logger interface as it duplicates

Jump to

Keyboard shortcuts

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