virt

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 27, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connection

type Connection struct {
	*libvirt.Connect // The underlying libvirt connection
}

func New

func New(connectionUri string) (*Connection, error)

func (*Connection) EnumerateActiveDomains

func (c *Connection) EnumerateActiveDomains() ([]*Domain, error)

func (*Connection) EnumerateAllDomains

func (c *Connection) EnumerateAllDomains() ([]*Domain, error)

func (*Connection) EnumerateStoppedDomains

func (c *Connection) EnumerateStoppedDomains() ([]*Domain, error)

type Domain

type Domain struct {
	libvirt.Domain // Core domain conneciton
}

func NewDomain

func NewDomain(domain libvirt.Domain) (*Domain, error)

func (*Domain) Clone

func (dom *Domain) Clone(virt *Connection, name string, linked bool) (newDomain *Domain, err error)

func (*Domain) GetVmmData

func (dom *Domain) GetVmmData() VmmDomainMetadata

func (*Domain) RestoreSavedState

func (dom *Domain) RestoreSavedState() error

func (*Domain) SaveState

func (dom *Domain) SaveState() error

func (*Domain) Snapshot

func (dom *Domain) Snapshot(name string) error

func (*Domain) UpdateVmmData

func (dom *Domain) UpdateVmmData(metadata VmmDomainMetadata) error

type VmmDomainMetadata

type VmmDomainMetadata struct {
	Path    string   `xml:"path"`
	Labels  []string `xml:"label"`
	XMLName xml.Name `xml:"vmm"`
}

Jump to

Keyboard shortcuts

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