firecracker

package
v0.4.159 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Overview

Package firecracker deals with anything related to Firecracker virtual machines. This involves creating, deleting, It also deals with keeping track of network interfaces, socket files.

Index

Constants

View Source
const (
	ERR_ACTIONS_REQ           = "Error in making PUT request to /actions with give body"
	ERR_BOOTSOURCE_REQ        = "Error in making PUT request to /boot-source with give body"
	ERR_DRIVES_REQ            = "Error in making PUT request to /drives with give body"
	ERR_MACHINE_CONFIG_REQ    = "Error in making PUT request to /machine-config with give body"
	ERR_NETWORK_INTERFACE_REQ = "Error in making PUT request to /network-interfaces with give body"
	ERR_MMDS_CONFIG           = "Error in making PUT request to /mmds/config with given body"
	ERR_MMDS_MSG              = "Error in making PUT request to /mmds with given body"
)

Variables

This section is empty.

Functions

func GenerateSocketFile

func GenerateSocketFile(n int) string

GenerateSocketFile generates a path for socket file to be used for communication with firecracker.

func NewClient

func NewClient(sockFile string) *http.Client

func RunPreviouslyRunningVMs

func RunPreviouslyRunningVMs() error

RunPreviouslyRunningVMs runs `runFromConfig` for every firecracker VM record found in local DB which are marked `running`.

func StartCustom

func StartCustom(ctx context.Context, custom CustomVM) error

func StartDefault

func StartDefault(ctx context.Context, def DefaultVM) error

Types

type CustomVM added in v0.4.159

type CustomVM struct {
	KernelImagePath string `json:"kernel_image_path"`
	FilesystemPath  string `json:"filesystem_path"`
	VCPUCount       int    `json:"vcpu_count"`
	MemSizeMib      int    `json:"mem_size_mib"`
	TapDevice       string `json:"tap_device"`
}

type DefaultVM added in v0.4.159

type DefaultVM struct {
	KernelImagePath string `json:"kernel_image_path"`
	FilesystemPath  string `json:"filesystem_path"`
	PublicKey       string `json:"public_key"`
	NodeID          string `json:"node_id"`
}

Directories

Path Synopsis
Package networking deals with enabling and managing networking inside firecracker virtual machines.
Package networking deals with enabling and managing networking inside firecracker virtual machines.

Jump to

Keyboard shortcuts

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