Documentation
¶
Index ¶
- func DevPath(idx int) string
- func EnsureVmlinux(kernelPath string) (string, error)
- func IsRelayMode() bool
- func RunRelay(ctx context.Context)
- type Config
- type Firecracker
- func (fc *Firecracker) Clone(ctx context.Context, vmID string, vmCfg *types.VMConfig, net types.NetSetup, ...) (*types.VM, error)
- func (fc *Firecracker) Console(ctx context.Context, ref string) (io.ReadWriteCloser, error)
- func (fc *Firecracker) Create(ctx context.Context, id string, vmCfg *types.VMConfig, ...) (*types.VM, error)
- func (fc *Firecracker) Delete(ctx context.Context, refs []string, force bool) ([]string, error)
- func (fc *Firecracker) DirectClone(ctx context.Context, vmID string, vmCfg *types.VMConfig, net types.NetSetup, ...) (*types.VM, error)
- func (fc *Firecracker) DirectRestore(ctx context.Context, vmRef string, vmCfg *types.VMConfig, ...) (*types.VM, error)
- func (fc *Firecracker) Restore(ctx context.Context, vmRef string, vmCfg *types.VMConfig, snapshot io.Reader, ...) (*types.VM, error)
- func (fc *Firecracker) Snapshot(ctx context.Context, ref string) (*types.SnapshotConfig, io.ReadCloser, error)
- func (fc *Firecracker) Start(ctx context.Context, refs []string) ([]string, error)
- func (fc *Firecracker) Stop(ctx context.Context, refs []string) ([]string, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnsureVmlinux ¶
EnsureVmlinux decompresses kernelPath if needed and returns the ELF path.
func IsRelayMode ¶
func IsRelayMode() bool
IsRelayMode returns true when the process was started as a console relay.
Types ¶
type Config ¶
type Config struct {
hypervisor.BaseConfig
}
Config holds Firecracker specific configuration.
func (*Config) BinaryName ¶
func (*Config) COWRawPath ¶
func (*Config) PIDFileName ¶
type Firecracker ¶
type Firecracker struct {
*hypervisor.Backend
// contains filtered or unexported fields
}
Firecracker implements hypervisor.Hypervisor using the Firecracker VMM. Only OCI images (direct kernel boot) are supported — no UEFI, no cloudimg, no Windows.
func New ¶
New creates a Firecracker backend. rec may be nil; the backend falls back to NopRecorder for emit calls.
func (*Firecracker) Console ¶
func (fc *Firecracker) Console(ctx context.Context, ref string) (io.ReadWriteCloser, error)
func (*Firecracker) Create ¶
func (fc *Firecracker) Create(ctx context.Context, id string, vmCfg *types.VMConfig, storageConfigs []*types.StorageConfig, net types.NetSetup, bootCfg *types.BootConfig) (*types.VM, error)
func (*Firecracker) DirectClone ¶
func (fc *Firecracker) DirectClone(ctx context.Context, vmID string, vmCfg *types.VMConfig, net types.NetSetup, snapshotConfig *types.SnapshotConfig, srcDir string) (*types.VM, error)
DirectClone clones from a local snapshot dir. Per-type: hardlink mem, reflink/copy COW, plain copy metadata.
func (*Firecracker) DirectRestore ¶
func (*Firecracker) Snapshot ¶
func (fc *Firecracker) Snapshot(ctx context.Context, ref string) (*types.SnapshotConfig, io.ReadCloser, error)
Snapshot pauses, captures vmstate+mem+COW, resumes, and streams the result.
Click to show internal directories.
Click to hide internal directories.