MCPcopy
hub / github.com/lima-vm/lima / ImageDiskManager

Interface ImageDiskManager

pkg/imgutil/manager.go:14–26  ·  view source on GitHub ↗

ImageDiskManager defines the common operations for disk image utilities.

Source from the content-addressed store, hash-verified

12
13// ImageDiskManager defines the common operations for disk image utilities.
14type ImageDiskManager interface {
15 // CreateDisk creates a new disk image with the specified size.
16 CreateDisk(ctx context.Context, disk string, size int64) error
17
18 // ResizeDisk resizes an existing disk image to the specified size.
19 ResizeDisk(ctx context.Context, disk string, size int64) error
20
21 // Convert converts a disk image to the specified format.
22 Convert(ctx context.Context, imageType image.Type, source, dest string, size *int64, allowSourceWithBackingFile bool) error
23
24 // MakeSparse makes a file sparse, starting from the specified offset.
25 MakeSparse(ctx context.Context, f *os.File, offset int64) error
26}

Callers 11

CreateDiskMethod · 0.65
PrepareFunction · 0.65
ResizeDiskMethod · 0.65
prepareDiskFunction · 0.65
diskResizeActionFunction · 0.65
convertToFunction · 0.65
ConvertMethod · 0.65
EnsureDiskFunction · 0.65
attachDisksFunction · 0.65
CmdlineFunction · 0.65
MakeSparseMethod · 0.65

Implementers 3

NativeImageUtilpkg/imgutil/nativeimgutil/nativeimguti
ImageDiskManagerpkg/imgutil/proxyimgutil/proxyimgutil.
QemuImageUtilpkg/qemuimgutil/qemuimgutil.go

Calls

no outgoing calls

Tested by

no test coverage detected