Documentation
¶
Overview ¶
Package qcow2 provides read-only access to qcow2 disk images, including images with deflate or zstd compression. Writing qcow2 images is not supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Image ¶
type Image struct {
// Stats are incremented by the library during reads. Exporting
// them to expvar, Prometheus, or other monitoring systems is
// left to the caller.
Stats
// contains filtered or unexported fields
}
Image is a read-only qcow2 disk image. It implements io.ReaderAt over the virtual disk contents.
func (*Image) ReadAt ¶
ReadAt reads from the virtual disk image at the given offset. It implements io.ReaderAt.
type Stats ¶
type Stats struct {
Reads expvar.Int // number of ReadAt calls
BytesRead expvar.Int // total virtual bytes returned
ClusterReads expvar.Int // total cluster-level read operations
ClusterHoles expvar.Int // reads served from unallocated or zero clusters
ClusterStandard expvar.Int // reads served from standard (uncompressed) clusters
ClusterCompressed expvar.Int // reads served from compressed clusters
L2CacheHits expvar.Int // L2 table found in cache
L2CacheMisses expvar.Int // L2 table read from underlying reader
L2CacheEvictions expvar.Int // L2 cache full clears
CompCacheHits expvar.Int // decompressed cluster found in cache
CompCacheMisses expvar.Int // cluster required decompression
CompCacheEvictions expvar.Int // decompressed cluster cache full clears
}
Stats contains counters for an Image. All fields are safe for concurrent access.
Click to show internal directories.
Click to hide internal directories.