Documentation
¶
Overview ¶
Package limadist downloads and installs the pinned Lima release the managed VM runs on.
Index ¶
Constants ¶
const ( // EnvBaseURL points the download at a mirror. The checksum stays compiled in. EnvBaseURL = "APP_LIMA_DOWNLOAD_BASE" // EnvTimeout bounds a whole download. EnvTimeout = "APP_LIMA_DOWNLOAD_TIMEOUT" // EnvStall bounds the wait for the next bytes. EnvStall = "APP_LIMA_DOWNLOAD_STALL_TIMEOUT" )
const Version = "2.2.1"
Version is the pinned Lima release. Change it together with the checksums below.
Variables ¶
var ( // ErrBusy means another process is installing right now. ErrBusy = errors.New("another Lima install is already running") // ErrChecksum means the archive is not the pinned release. ErrChecksum = errors.New("the download does not match the pinned checksum") )
var ErrNotFound = errors.New("limactl not found")
ErrNotFound means there is no limactl anywhere Find looks.
Functions ¶
func Install ¶
Install fetches, verifies and unpacks the pinned release, and returns its limactl. The tree appears under its version name only once complete; an interrupted download resumes next time.
func PinnedPath ¶
PinnedPath is where Install puts the pinned limactl.
Types ¶
type Options ¶
type Options struct {
DataDir string
Arch string // Go architecture name
BaseURL string // empty means the official release page
Timeout time.Duration
Stall time.Duration
Client *http.Client
Progress func(done, total int64)
// contains filtered or unexported fields
}
Options configures Install. The expected checksum is deliberately not among them.
func OptionsFromEnv ¶
OptionsFromEnv reads the mirror and time limits.