package
0.0.0-20241231175036-e5a3c7784f22
Repository: https://github.com/firecracker-microvm/firecracker-containerd.git
Documentation: pkg.go.dev

# Packages

Package bundle implements some helper functions for firecracker-containerd's interaction with bundle dirs, both inside the VM and outside on the host.
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

AverageCPUDeltas returns the average CPU cycles consumed per sampleInterval, as calculated between the time this function is invoked and the time the provided ctx is cancelled.
CreateBlockDevice creates a block device, or block special file for testing.
CreateFSImg will create a file containing a filesystem image of the provided type containing the provided files.
GenerateStubContent will generate stub content using the magic stub bytes and a length encoded string.
IsStubDrive will check to see if the io.Reader follows our stub drive format.
NewLocalNetworkServices returns an implementation of LocalNetworkServices where the DNS server will bind to the ip of a created device and serve a single mapping from "domain" to that ip.
ParseProcMountLines converts the provided strings, presumed to be lines read from /proc/mounts into MountInfo objects holding the parsed data about each mount.
ParseStubContent will parse the contents of an io.Reader and return the given id that was encoded.
RequiresIsolation will ensure that tests that must be run in an isolated environment are being run with the explicit ENABLE_ISOLATED_TESTS env var.
RequiresRoot will ensure that tests that require root access are actually root.
SupportCPUTemplate returns true if Firecracker supports CPU templates on the current architecture.
WaitForPidToExit queries running processes every `queryInterval` duration, blocking until the provided pid is found to not exist or the context is canceled.
WaitForProcessToExist queries running processes every `queryInterval` duration, blocking until the provided matcher function returns true for at least one running process or the context is canceled.

# Constants

BundleRootfsName is the name of the bundle's directory for holding the container's rootfs.
DefaultBufferSize represents buffer size in bytes to used for IO between runtime and agent.
FCSocketFDEnvKey is the environment variable key used to provide the FD of the fccontrol listening socket to a shim.
FirecrackerLogFifoName is the name of the Firecracker VMM log FIFO.
FirecrackerMetricsFifoName is the name of the Firecracker VMM metrics FIFO.
FirecrackerSockName is the name of the Firecracker VMM API socket.
FirecrackerVSockName is the name of the Firecracker VSock unix path used for communication between the runtime and the agent.
OCIConfigName is the name of the OCI bundle's config field.
ShimAddrFileName is the name of the file in which a shim's API address can be found, used by containerd to reconnect after it restarts.
ShimBinaryName is the name of the runtime shim binary.
ShimLogFifoName is the name of the FIFO created by containerd for a shim to write its logs to.
StderrPort represents vsock port to be used for stderr.
StdinPort represents vsock port to be used for stdin.
StdoutPort represents vsock port to be used for stdout.
VMIDEnvVarKey is the environment variable key used to provide a VMID to a shim process.

# Variables

MagicStubBytes used to determine whether or not a drive is a stub drive.

# Structs

FSImgFile represents a file intended to be place in a filesystem image (at the provided subpath with the provided contents).
MountInfo holds data parsed from a line of /proc/mounts.

# Interfaces

LocalNetworkServices provides a way of running bare-bones DNS and HTTP servers bound to the ip of a created device, which enables testing VM networking without relying on an external network.