Documentation ¶
Rendered for windows/amd64
Index ¶
- Constants
- func CacheFile(ctx context.Context, tb testing.TB, dir string) string
- func FromChainID(ctx context.Context, tb testing.TB, client *containerd.Client, ...) []string
- func FromImage(ctx context.Context, tb testing.TB, client *containerd.Client, ...) []string
- func FromMount(_ context.Context, tb testing.TB, m mount.Mount) (layers []string)
- func ScratchSpace(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM, name, dir, cache string) (string, string)
- func WCOWScratchDir(ctx context.Context, tb testing.TB, dir string) string
- type LazyImageLayers
Constants ¶
View Source
const ( CacheFileName = "cache.vhdx" ScratchSpaceName = "sandbox.vhdx" UVMScratchSpaceName = "uvmscratch.vhdx" )
Variables ¶
This section is empty.
Functions ¶
func FromChainID ¶
func FromChainID(ctx context.Context, tb testing.TB, client *containerd.Client, chainID, snapshotter string) []string
FromChainID returns thee layer paths of a given image chain ID
func FromImage ¶
func FromImage(ctx context.Context, tb testing.TB, client *containerd.Client, ref, platform, snapshotter string) []string
FromImage returns thee layer paths of a given image, pulling it if necessary
func ScratchSpace ¶
func ScratchSpace(ctx context.Context, tb testing.TB, vm *uvm.UtilityVM, name, dir, cache string) (string, string)
ScratchSpace creates an LCOW scratch space VHD at `dir/name`, and returns the directory and scratch space file path. If name (or dir or cache) is empty, ScratchSpace uses ScratchSpaceName (creates a temporary directory), respectively.
Types ¶
type LazyImageLayers ¶
type LazyImageLayers struct { Image string Platform string AppendVerity bool // TempPath is the path to create a temporary directory in. // Defaults to [os.TempDir] if left empty. TempPath string // contains filtered or unexported fields }
func (*LazyImageLayers) Close ¶
func (x *LazyImageLayers) Close(ctx context.Context) error
Close removes the downloaded image layers.
Does not take a testing.TB so it can be used in TestMain or init.
Click to show internal directories.
Click to hide internal directories.