Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Opt ¶
type Opt func(*options) error
func WithCache ¶
func WithCache() Opt
WithCache enables caching using filepath.Join(os.UserCacheDir(), "lima") as the cache dir.
func WithCacheDir ¶
WithCacheDir enables caching using the specified dir. Empty value disables caching.
func WithExpectedDigest ¶
func WithExpectedDigest(expectedDigest digest.Digest) Opt
WithExpectedDigest is used to validate the downloaded file against the expected digest.
The digest is not verified in the following cases: - The digest was not specified. - The file already exists in the local target path.
When the `data` file exists in the cache dir with `digest.<ALGO>` file, the digest is verified by comparing the content of `digest.<ALGO>` with the expected digest string. So, the actual digest of the `data` file is not computed.