volumes

package
v0.0.0-...-03200e1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2024 License: MIT Imports: 3 Imported by: 2

Documentation

Index

Constants

View Source
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

func (VolumeDownload) Read

func (v VolumeDownload) Read(p []byte) (n int, e error)

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

func (VolumeTransfert) Read

func (v VolumeTransfert) Read(p []byte) (n int, e error)

func (VolumeTransfert) Write

func (v VolumeTransfert) Write(p []byte) (n int, e error)

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

func (VolumeUpload) Write

func (v VolumeUpload) Write(p []byte) (n int, e error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL