Documentation
¶
Overview ¶
Package fetch downloads and caches remote files (cloud images, VMM binaries, firmware), verifying an optional SHA256 and writing atomically so a cached file is always complete. It is the shared download primitive behind internal/image and the cloud-hypervisor backend (ADR-0011).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Ensure ¶
Ensure downloads url into cacheDir/name and returns the path. If the file is already cached it returns immediately. The download goes to a .download temp file that is verified (when sha256hex is non-empty) and atomically renamed, so a partial or mismatched download never leaves a usable file behind. An empty sha256hex skips verification (used by the image catalog's "latest" entries); callers that pin versions pass the digest to make verification mandatory.
Types ¶
This section is empty.