Documentation
¶
Index ¶
- Variables
- func CloseHyper(name string)
- type CurMemXML
- type DevicesXML
- type DiskDriverXML
- type DiskSourceXML
- type DiskTargetXML
- type DiskXML
- type Domain
- type DomainXML
- type GraphicsXML
- type HyperVisor
- func (h *HyperVisor) DomainDefineXML(xmlConfig string) (*Domain, error)
- func (h *HyperVisor) GetCPU() (int, string)
- func (h *HyperVisor) GetMem() (uint64, uint64, float64)
- func (h *HyperVisor) GetRootfs() string
- func (h *HyperVisor) Init()
- func (h *HyperVisor) ListAllDomains() ([]Domain, error)
- func (h *HyperVisor) LookupDomainByName(id string) (*Domain, error)
- func (h *HyperVisor) LookupDomainByUUIDName(id string) (*Domain, error)
- func (h *HyperVisor) LookupDomainByUUIDString(id string) (*Domain, error)
- type MemXML
- type OSBootXML
- type OSTypeXML
- type OSXML
- type VCPUXML
Constants ¶
This section is empty.
Variables ¶
View Source
var DOMAIN_ALL = libvirt.CONNECT_LIST_DOMAINS_ACTIVE | libvirt.CONNECT_LIST_DOMAINS_INACTIVE
Functions ¶
func CloseHyper ¶
func CloseHyper(name string)
Types ¶
type CurMemXML ¶
type DevicesXML ¶
type DevicesXML struct {
XMLName xml.Name `xml:"devices" json:"-"`
Graphics []GraphicsXML `xml:"graphics" json:"graphics"`
Disks []DiskXML `xml:"disk" json:"disk"`
}
func (*DevicesXML) Decode ¶
func (devices *DevicesXML) Decode(xmlData string) error
type DiskDriverXML ¶
type DiskDriverXML struct {
XMLName xml.Name `xml:"driver" json:"-"`
Type string `xml:"type,attr" json:"type"`
Name string `xml:"name,attr" json:"name"`
}
func (*DiskDriverXML) Decode ¶
func (drv *DiskDriverXML) Decode(xmlData string) error
type DiskSourceXML ¶
type DiskSourceXML struct {
XMLName xml.Name `xml:"source" json:"-"`
File string `xml:"file,attr,omitempty" json:"file,omitempty"`
Device string `xml:"device,attr,omitempty" json:"device,omitempty"`
}
func (*DiskSourceXML) Decode ¶
func (src *DiskSourceXML) Decode(xmlData string) error
type DiskTargetXML ¶
type DiskTargetXML struct {
XMLName xml.Name `xml:"target" json:"-"`
Bus string `xml:"bus,attr" json:"bus"`
Dev string `xml:"dev,attr" json:"dev"`
}
func (*DiskTargetXML) Decode ¶
func (tgt *DiskTargetXML) Decode(xmlData string) error
type DiskXML ¶
type DiskXML struct {
XMLName xml.Name `xml:"disk" json:"-"`
Type string `xml:"type,attr" json:"type"`
Device string `xml:"device,attr" json:"device"`
Driver DiskDriverXML `xml:"driver" json:"driver"`
Source DiskSourceXML `xml:"source" json:"source"`
Target DiskTargetXML `xml:"target" json:"target"`
}
type DomainXML ¶
type DomainXML struct {
XMLName xml.Name `xml:"domain" json:"-"`
Id string `xml:"id,attr" json:"id"`
Type string `xml:"type,attr" json:"type"`
Name string `xml:"name" json:"name"`
Uuid string `xml:"uuid" json:"uuid"`
Devices DevicesXML `xml:"devices" json:"devices"`
Memory MemXML `xml:"memory" json:"memory"`
CurMem CurMemXML `xml:"currentMemory" json:"currentMemory"`
VCPUXml VCPUXML `xml:"vcpu" json:"vcpu"`
OS OSXML `xml:"os" json:"os"`
}
func NewDomainXMLFromDom ¶
func (*DomainXML) VNCDisplay ¶
type GraphicsXML ¶
type GraphicsXML struct {
XMLName xml.Name `xml:"graphics" json:"-"`
Type string `xml:"type,attr" json:"type"`
Port string `xml:"port,attr" json:"port"`
Listen string `xml:"listen,attr" json:"listen"`
}
func (*GraphicsXML) Decode ¶
func (graphics *GraphicsXML) Decode(xmlData string) error
type HyperVisor ¶
type HyperVisor struct {
Name string
Schema string
Address string
Path string
Conn *libvirt.Connect
}
func GetHyper ¶
func GetHyper() (*HyperVisor, error)
func SetHyper ¶
func SetHyper(name string) (*HyperVisor, error)
func (*HyperVisor) DomainDefineXML ¶
func (h *HyperVisor) DomainDefineXML(xmlConfig string) (*Domain, error)
func (*HyperVisor) GetCPU ¶
func (h *HyperVisor) GetCPU() (int, string)
func (*HyperVisor) GetRootfs ¶
func (h *HyperVisor) GetRootfs() string
func (*HyperVisor) Init ¶
func (h *HyperVisor) Init()
func (*HyperVisor) ListAllDomains ¶
func (h *HyperVisor) ListAllDomains() ([]Domain, error)
func (*HyperVisor) LookupDomainByName ¶
func (h *HyperVisor) LookupDomainByName(id string) (*Domain, error)
func (*HyperVisor) LookupDomainByUUIDName ¶
func (h *HyperVisor) LookupDomainByUUIDName(id string) (*Domain, error)
func (*HyperVisor) LookupDomainByUUIDString ¶
func (h *HyperVisor) LookupDomainByUUIDString(id string) (*Domain, error)
type MemXML ¶
type OSBootXML ¶
type OSTypeXML ¶
Click to show internal directories.
Click to hide internal directories.