api

import "github.com/analog-substance/carbon/pkg/providers/qemu/api"

Index

type Domain

type Domain struct {
    LVDomain *libvirt.Domain

    LVDomainState *libvirt.DomainState
    ID            string
    Name          string

    PublicIPAddresses  []string
    PrivateIPAddresses []string
    CurrentUpTime      time.Duration
    // contains filtered or unexported fields
}

func (*Domain) Destroy

func (d *Domain) Destroy() error

func (*Domain) Reboot

func (d *Domain) Reboot() error

func (*Domain) Start

func (d *Domain) Start() error

func (*Domain) Suspend

func (d *Domain) Suspend() error

type QEMU

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

func Connect

func Connect(libVirtURL string) (*QEMU, error)

func (*QEMU) AllNetworks

func (q *QEMU) AllNetworks() ([]libvirt.Network, error)

func (*QEMU) Close

func (q *QEMU) Close() error

func (*QEMU) CreateDomain

func (q *QEMU) CreateDomain(name string, storageVol *StorageVolume) (*Domain, error)

func (*QEMU) GetDomain

func (q *QEMU) GetDomain(id string) (*Domain, error)

func (*QEMU) GetDomains

func (q *QEMU) GetDomains() ([]*Domain, error)

func (*QEMU) GetStoragePool

func (q *QEMU) GetStoragePool(name string) (*StoragePool, error)

func (*QEMU) GetStoragePools

func (q *QEMU) GetStoragePools() ([]*StoragePool, error)

type StoragePool

type StoragePool struct {
    LVStoragePool *libvirt.StoragePool
    Volumes       []*StorageVolume
    // contains filtered or unexported fields
}

func (*StoragePool) GetVolumes

func (s *StoragePool) GetVolumes() ([]*StorageVolume, error)

func (*StoragePool) ImportImage

func (s *StoragePool) ImportImage(name string, imageFile string) (*StorageVolume, error)

type StorageVolume

type StorageVolume struct {
    LVStorageVolume *libvirt.StorageVol
    // contains filtered or unexported fields
}
Last modified March 27, 2025: Add GCP Support (#88) (dccf344)