Documentation ¶
Index ¶
Constants ¶
View Source
const FormatUnknown string = "unknown"
FormatUnknown means that qemu-img could not determine the file's format.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ImageInfo ¶
type ImageInfo struct { Format string ActualSizeBytes int64 VirtualSizeBytes int64 // This checksum is calculated from the partial disk content extracted by QEMU. Checksum string }
ImageInfo includes metadata returned by `qemu-img info`.
type InfoClient ¶
InfoClient runs `qemu-img info` and returns the results.
func NewInfoClient ¶
func NewInfoClient() InfoClient
NewInfoClient returns a new instance of InfoClient.
type Inspector ¶
type Inspector interface { // Inspect returns Metadata for the image file associated // with a reference. IO operations will be retried until the context is cancelled. Inspect(ctx context.Context, reference string) (Metadata, error) }
Inspector returns metadata about image files.
func NewGCSInspector ¶
func NewGCSInspector() Inspector
NewGCSInspector returns an inspector that inspects image files that are stored in the GCS bucket. The Inspect method expects a GCS URI to the file to be inspected.
type Metadata ¶
type Metadata struct { // PhysicalSizeGB is the size of the file itself, rounded up to the nearest GB. PhysicalSizeGB int64 // VirtualSizeGB is the size of the disk, after inflation. Rounded up to the nearest GB. VirtualSizeGB int64 // FileFormat is the format used for encoding the VM disk. FileFormat string Checksum string }
Metadata contains metadata about an image file.
Click to show internal directories.
Click to hide internal directories.