imagerepo

package
v0.0.0-...-e507620 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2020 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DownloadVolumeData

type DownloadVolumeData struct {
	// contains filtered or unexported fields
}

type PoolManager

type PoolManager struct {
	Name   string
	Path   string
	Notify chan *libvirt.StoragePool
}

func NewPoolManager

func NewPoolManager(name, path string) *PoolManager

func (*PoolManager) Load

func (m *PoolManager) Load(conn *libvirt.Connect)

type Repository

type Repository struct {
	// contains filtered or unexported fields
}

func CreateRepository

func CreateRepository(clientset *kubernetes.Clientset, repoclient *api.VirtimagerepoClient, fileclient *api.VirtimagefileClient, resource *apiv1.Virtimagerepo, repopath string) *Repository

func (*Repository) AddFile

func (r *Repository) AddFile(file *apiv1.Virtimagefile)

func (*Repository) DeleteFile

func (r *Repository) DeleteFile(file *apiv1.Virtimagefile)

func (*Repository) DownloadVolume

func (r *Repository) DownloadVolume(stream *libvirt.Stream, imagerepo, imagefile, token string) (uint64, string, int, error)

func (*Repository) ModifyFile

func (r *Repository) ModifyFile(file *apiv1.Virtimagefile)

func (*Repository) Refresh

func (r *Repository) Refresh() error

func (*Repository) SetPool

func (r *Repository) SetPool(pool *libvirt.StoragePool) error

func (*Repository) UnsetPool

func (r *Repository) UnsetPool() error

func (*Repository) UploadVolume

func (r *Repository) UploadVolume(stream *libvirt.Stream, length uint64, imagerepo, imagefile, token string) (uint64, int, error)

type RepositoryFile

type RepositoryFile struct {
	// contains filtered or unexported fields
}

type RepositoryJob

type RepositoryJob interface {
	Process() error
	Finish(*Repository) error
}

type RepositoryJobAction

type RepositoryJobAction string
var RepositoryJobActionCreate RepositoryJobAction = "create"
var RepositoryJobActionDelete RepositoryJobAction = "delete"

type RepositoryJobCreate

type RepositoryJobCreate struct {
	// contains filtered or unexported fields
}

func (*RepositoryJobCreate) Finish

func (j *RepositoryJobCreate) Finish(r *Repository) error

func (*RepositoryJobCreate) Process

func (j *RepositoryJobCreate) Process() error

type RepositoryJobDelete

type RepositoryJobDelete struct {
	// contains filtered or unexported fields
}

func (*RepositoryJobDelete) Finish

func (j *RepositoryJobDelete) Finish(r *Repository) error

func (*RepositoryJobDelete) Process

func (j *RepositoryJobDelete) Process() error

type RepositoryJobResize

type RepositoryJobResize struct {
	// contains filtered or unexported fields
}

func (*RepositoryJobResize) Finish

func (j *RepositoryJobResize) Finish(r *Repository) error

func (*RepositoryJobResize) Process

func (j *RepositoryJobResize) Process() error

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(libvirtURI string, streamAddr string, streamInsecure bool, streamTLSConfig *tls.Config, kubeconfigfile string, reponame string, repopath string) (*Service, error)

func (*Service) DownloadVolume

func (r *Service) DownloadVolume(imagerepo, imagefile, token string) (io.ReadCloser, uint64, string, int, error)

func (*Service) Run

func (s *Service) Run() error

func (*Service) UploadVolume

func (r *Service) UploadVolume(imagerepo, imagefile, token string) (io.WriteCloser, uint64, int, error)

type UploadVolumeData

type UploadVolumeData struct {
	// contains filtered or unexported fields
}

type VolumeIOResolver

type VolumeIOResolver interface {
	UploadVolume(imagerepo, imagefile, token string) (io.WriteCloser, uint64, int, error)

	DownloadVolume(imagerepo, imagefile, token string) (io.ReadCloser, uint64, string, int, error)
}

XXX kind of ugly to include the http status code as an return param but mapping error -> status codes in a fine grained manner is fugly too

type VolumeStreamer

type VolumeStreamer struct {
	// contains filtered or unexported fields
}

func NewVolumeStreamer

func NewVolumeStreamer(listenAddr string, insecure bool, tlsConfig *tls.Config, ioresolver VolumeIOResolver) *VolumeStreamer

func (*VolumeStreamer) Run

func (s *VolumeStreamer) Run(done chan error)

func (*VolumeStreamer) Serve

func (s *VolumeStreamer) Serve() error

Jump to

Keyboard shortcuts

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