Documentation ¶
Index ¶
- func StartService()
- type IImage
- type QemuioBlkDev
- type SFile
- type SHostImageOptions
- type SQcow2Image
- func (img *SQcow2Image) Close()
- func (img *SQcow2Image) Length() int64
- func (img *SQcow2Image) Load(imagePath string, readonly, reference bool) error
- func (img *SQcow2Image) Open(imagePath string, readonly bool, encryptInfo *apis.SEncryptInfo) error
- func (img *SQcow2Image) Read(offset, count int64) ([]byte, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StartService ¶
func StartService()
Types ¶
type IImage ¶
type IImage interface { // Open image file and its backing file (if have) Open(imagePath string, readonly bool, encryptInfo *apis.SEncryptInfo) error // load opend qcow2 img form qemu blk cache Load(imagePath string, readonly, reference bool) error // Close may not really close image file handle, just reudce ref count Close() // If return number < 0 indicate read failed Read(offset, count int64) ([]byte, error) // Get image file length, not file actual length, it's image virtual size Length() int64 }
type QemuioBlkDev ¶
type QemuioBlkDev struct {
// contains filtered or unexported fields
}
func LoadQcow2 ¶
func LoadQcow2(imagePath string, readonly bool) *QemuioBlkDev
func OpenQcow2 ¶
func OpenQcow2(disk *qemuimg.SImageInfo, readonly bool) *QemuioBlkDev
func (*QemuioBlkDev) CloseQcow2 ¶
func (qb *QemuioBlkDev) CloseQcow2()
func (*QemuioBlkDev) Qcow2GetLength ¶
func (qb *QemuioBlkDev) Qcow2GetLength() int64
type SHostImageOptions ¶
type SHostImageOptions struct { common_options.CommonOptions LocalImagePath []string `help:"Local Image Paths"` LVMVolumeGroups []string `help:"LVM Volume Groups(vgs)"` SnapshotDirSuffix string `help:"Snapshot dir name equal diskId concat snapshot dir suffix" default:"_snap"` CommonConfigFile string `help:"common config file for container"` StreamChunkSize int `help:"Download stream chunk size KB" default:"4096"` Lz4ChecksumOff bool `help:"Turn off lz4 checksum option"` }
var (
HostImageOptions SHostImageOptions
)
type SQcow2Image ¶
type SQcow2Image struct {
// contains filtered or unexported fields
}
func (*SQcow2Image) Close ¶
func (img *SQcow2Image) Close()
func (*SQcow2Image) Length ¶
func (img *SQcow2Image) Length() int64
func (*SQcow2Image) Load ¶
func (img *SQcow2Image) Load(imagePath string, readonly, reference bool) error
func (*SQcow2Image) Open ¶
func (img *SQcow2Image) Open(imagePath string, readonly bool, encryptInfo *apis.SEncryptInfo) error
Click to show internal directories.
Click to hide internal directories.