{"modulePath":"github.com/kernel/hypeman","version":"v0.4.0","isLatest":true,"isStandardLibrary":false,"goos":"linux","goarch":"amd64","docs":"# package firecracker\n\n## Functions\n\n```go\nfunc NewVsockDialer(vsockSocket string, vsockCID int64) hypervisor.VsockDialer\n```\n\n```go\nfunc SetCustomBinaryPath(path string)\n```\nSetCustomBinaryPath configures a runtime override for the firecracker binary. When set, this path always takes precedence over embedded binaries.\n\n```go\nfunc SetJailerConfig(cfg JailerConfig)\n```\nSetJailerConfig sets the process-wide jailer configuration. VMs read it at start.\n\n## Types\n\n```go\ntype Firecracker struct {\n\t// contains filtered or unexported fields\n}\n```\nFirecracker implements hypervisor.Hypervisor for the Firecracker VMM.\n\n```go\nfunc New(socketPath string) (*Firecracker, error)\n```\n\n```go\nfunc (f *Firecracker) Capabilities() hypervisor.Capabilities\n```\n\n```go\nfunc (f *Firecracker) DeleteVM(ctx context.Context) error\n```\n\n```go\nfunc (f *Firecracker) GetTargetGuestMemoryBytes(ctx context.Context) (int64, error)\n```\n\n```go\nfunc (f *Firecracker) GetVMInfo(ctx context.Context) (*hypervisor.VMInfo, error)\n```\n\n```go\nfunc (f *Firecracker) Pause(ctx context.Context) error\n```\n\n```go\nfunc (f *Firecracker) ResizeMemory(ctx context.Context, bytes int64) error\n```\n\n```go\nfunc (f *Firecracker) ResizeMemoryAndWait(ctx context.Context, bytes int64, timeout time.Duration) error\n```\n\n```go\nfunc (f *Firecracker) Resume(ctx context.Context) error\n```\n\n```go\nfunc (f *Firecracker) SetTargetGuestMemoryBytes(ctx context.Context, bytes int64) error\n```\n\n```go\nfunc (f *Firecracker) Shutdown(ctx context.Context) error\n```\n\n```go\nfunc (f *Firecracker) Snapshot(ctx context.Context, destPath string) error\n```\n\n```go\ntype JailerConfig struct {\n\tEnabled bool\n\t// BinaryPath overrides the jailer embedded with each firecracker version.\n\tBinaryPath string\n\tUID        int\n\tGID        int\n}\n```\nJailerConfig runs each firecracker process under the firecracker jailer. The VMM runs as UID/GID inside a chroot under its instance directory and can open only the files hypeman links into that chroot.\n\n```go\ntype Starter struct{}\n```\nStarter implements hypervisor.VMStarter for Firecracker.\n\n```go\nfunc NewStarter() *Starter\n```\n\n```go\nfunc (s *Starter) GetBinaryPath(p *paths.Paths, version string) (string, error)\n```\n\n```go\nfunc (s *Starter) GetVersion(p *paths.Paths) (string, error)\n```\n\n```go\nfunc (s *Starter) PrepareFork(ctx context.Context, req hypervisor.ForkPrepareRequest) (hypervisor.ForkPrepareResult, error)\n```\nPrepareFork updates Firecracker restore metadata for forked snapshots. Firecracker snapshot restore supports network overrides, but does not expose a public API for rewriting other snapshotted device paths. For standby/running forks, we persist source/target directory mapping so RestoreVM can temporarily alias source paths during snapshot load.\n\n```go\nfunc (s *Starter) ResolveVersion(p *paths.Paths, requested string) (string, error)\n```\n\n```go\nfunc (s *Starter) RestoreVM(ctx context.Context, p *paths.Paths, version string, socketPath string, snapshotPath string) (int, hypervisor.Hypervisor, error)\n```\n\n```go\nfunc (s *Starter) SocketName() string\n```\n\n```go\nfunc (s *Starter) StartVM(ctx context.Context, p *paths.Paths, version string, socketPath string, config hypervisor.VMConfig) (int, hypervisor.Hypervisor, error)\n```\n\n```go\nfunc (s *Starter) ValidateConfig(config hypervisor.VMConfig) error\n```\n\n```go\ntype Version string\n```\n\n```go\nconst (\n\tV1_14_2 Version = \"v1.14.2\"\n\tV1_16_1 Version = \"v1.16.1\"\n\tV1_17_0 Version = \"v1.17.0\"\n)\n```\n\n```go\ntype VsockDialer struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\nfunc (d *VsockDialer) DialVsock(ctx context.Context, port int) (net.Conn, error)\n```\n\n```go\nfunc (d *VsockDialer) Key() string\n```\n\n","path":"github.com/kernel/hypeman/lib/hypervisor/firecracker","name":"firecracker","synopsis":"","isRedistributable":true}
