Documentation
¶
Overview ¶
Package image downloads the VM image of a release of aibox: the kernel and the root disk, which a release carries as one archive for each architecture. The release workflow builds the images before aibox and writes their SHA-256 into it, so aibox takes only the image it was released with.
Index ¶
Constants ¶
const ReleasesURL = "https://github.com/The127/aibox/releases/download"
ReleasesURL is where the files of the releases of aibox are.
Variables ¶
var ( // ErrChecksum is an archive that is not the one aibox was released with. ErrChecksum = errors.New("the image is not the one of this release") // ErrArchive is an archive that holds anything but the kernels and the // root disk. ErrArchive = errors.New("the archive of the image holds other files than the kernels and the root disk of its architecture") )
Functions ¶
func Digest ¶
Digest is the SHA-256 of the image archive of the architecture this aibox was released with.
func KernelDigest ¶ added in v1.5.0
KernelDigest is the SHA-256 of the kernel of the architecture this aibox was released with.
func NewClient ¶
NewClient is a client for downloads that gives up on a server that does not answer, but not on a slow download.
func Prune ¶
Prune removes from parent the images of the releases other than keep, and downloads a run that crashed left behind. The image of a build from a checkout, right in parent, stays.
Types ¶
type Fetcher ¶
Fetcher downloads images from the releases at BaseURL. Progress, if set, hears how many bytes of how many arrived so far. The total is -1 when the server does not say.