Documentation ¶
Index ¶
Constants ¶
const (
VolumeCopyBufferSize = 10 * 1024 * 1024
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type VolumeDownload ¶
type VolumeDownload struct {
// contains filtered or unexported fields
}
VolumeDownload contains source and destination for the download operation
func NewVolumeDownload ¶
func NewVolumeDownload(volSrc *libvirt.StorageVol, connSrc *libvirt.Connect, dstFile string) (instance *VolumeDownload, err error)
NewVolumeDownload is a variant that writes to a file
func NewVolumeDownloadToWriter ¶
func NewVolumeDownloadToWriter(volSrc *libvirt.StorageVol, connSrc *libvirt.Connect, streamDst io.WriteCloser) (instance *VolumeDownload, err error)
NewVolumeDownloadToWriter creates a VolumeDownload instance, allowing to download a file from a libvirt storage pool to an io.WriteCloser
func (*VolumeDownload) Copy ¶
func (v *VolumeDownload) Copy() (written int64, err error)
Copy do the actual download
type VolumeTransfert ¶
type VolumeTransfert struct {
// contains filtered or unexported fields
}
VolumeTransfert contains source and destination for the transfert operation
func NewVolumeTransfert ¶
func NewVolumeTransfert(connSrc *libvirt.Connect, volSrc *libvirt.StorageVol, connDst *libvirt.Connect, volDst *libvirt.StorageVol) (instance *VolumeTransfert, err error)
NewVolumeTransfert creates a VolumeTransfert instance, allowing to transfert a content from a libvirt storage pool to another
func (*VolumeTransfert) Copy ¶
func (v *VolumeTransfert) Copy() (written int64, err error)
Copy do the actual transfert
type VolumeUpload ¶
type VolumeUpload struct {
// contains filtered or unexported fields
}
VolumeUpload contains source and destination for the upload operation
func NewVolumeUploadFromReader ¶
func NewVolumeUploadFromReader(streamSrc io.ReadCloser, connDst *libvirt.Connect, volDst *libvirt.StorageVol) (instance *VolumeUpload, err error)
NewVolumeUploadFromReader creates a VolumeUpload instance, allowing to upload a file to a libvirt storage pool
func (*VolumeUpload) Copy ¶
func (v *VolumeUpload) Copy() (written int64, err error)
Copy do the actual upload