Documentation
¶
Overview ¶
Package embedimg carries funcd's curated runtime images baked into the binary (ADR-0054). At release/integration time each per-arch curated image is exported to an OCI tar and embedded here via go:embed; at startup the ctrmanager imports the matching tar into the privately-managed containerd (client.Import) so the platform runs functions with NO registry pull (the k3s/dockerd self-contained model).
PLACEHOLDER NOTE (impl-time, honest): the committed nodejs22.tar / python314.tar are tiny (<1 KB) clearly-labeled STAND-INS, not real OCI images — they exist only so the embed directive has a file at compile time and Tar(...) returns a non-empty reader (the ADR-0054 non-gated unit test). The REAL multi-MB per-arch distroless tars are produced by `just build-runtime-images` and overwrite the placeholders before the binary ships (see README.md). `go build` / `just ci` are green on the placeholder; building and importing the real images is the Linux+root release/integration concern.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Tar ¶
Tar returns the embedded OCI image tar for a runtime ("nodejs22"/"python314") as a fresh, UNCOMPRESSED reader ready for containerd's client.Import (which reads a raw tar stream, not a gzip one). The curated export may be gzip-compressed (e.g. `docker save`-style output): if the embedded bytes start with the gzip magic, Tar transparently wraps them in a gzip.Reader so the caller always sees a plain tar. ok==false means "no embedded tar for this runtime" — the driver then falls through to ImageOverride/Pull; a runtime in neither embed nor override is the caller's NotFound (never a silent miss). The returned reader is independent per call.
func TarForImageRef ¶
TarForImageRef maps a curated image reference to its embedded OCI tar, so the containerd driver can import the embed into the function's own containerd namespace on demand (no registry pull — ADR-0054). It parses the runtime out of the ref: the path component after the last "/", with a leading "runtime-" and a trailing ":<tag>" stripped — so "funcd/runtime-nodejs22:latest" → "nodejs22" → Tar("nodejs22"). ok==false means the ref does not match the curated pattern (an ImageOverride / arbitrary registry ref) — the driver then falls back to a registry Pull.
Types ¶
This section is empty.