Documentation
¶
Overview ¶
Package firecracker provides a backend that executes code in Firecracker microVMs. Provides strongest isolation; higher complexity and operational cost. Appropriate for high-risk multi-tenant execution.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrFirecrackerNotAvailable is returned when Firecracker is not available. ErrFirecrackerNotAvailable = errors.New("firecracker not available") // ErrMicroVMCreationFailed is returned when microVM creation fails. ErrMicroVMCreationFailed = errors.New("microvm creation failed") // ErrMicroVMExecutionFailed is returned when microVM execution fails. ErrMicroVMExecutionFailed = errors.New("microvm execution failed") )
Errors for Firecracker backend operations.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend struct {
// contains filtered or unexported fields
}
Backend executes code in Firecracker microVMs.
func (*Backend) Execute ¶
func (b *Backend) Execute(ctx context.Context, req runtime.ExecuteRequest) (runtime.ExecuteResult, error)
Execute runs code in a Firecracker microVM.
func (*Backend) Kind ¶
func (b *Backend) Kind() runtime.BackendKind
Kind returns the backend kind identifier.
type Config ¶
type Config struct {
// BinaryPath is the path to the firecracker binary.
// Default: firecracker (uses PATH)
BinaryPath string
// KernelPath is the path to the guest kernel.
// Required for execution.
KernelPath string
// RootfsPath is the path to the root filesystem image.
// Required for execution.
RootfsPath string
// SocketPath is the path for the Firecracker API socket.
// Default: auto-generated per VM
SocketPath string
// VCPUCount is the number of virtual CPUs.
// Default: 1
VCPUCount int
// MemSizeMB is the memory size in megabytes.
// Default: 128
MemSizeMB int
// Logger is an optional logger for backend events.
Logger Logger
}
Config configures a Firecracker backend.
Click to show internal directories.
Click to hide internal directories.