Documentation ¶
Index ¶
- Constants
- func ConnectDomainEventDeregister(conn VirConnection, callbackid int)
- func ConnectDomainEventRegister(conn VirConnection, domain VirDomain, event int, eventHandler interface{}) int
- func EventRegisterDefaultImpl() error
- func EventRunDefaultImpl() int
- func GenericCallBack(cPtr C.virConnectPtr, vPtr C.virDomainPtr, cData unsafe.Pointer)
- func GetLastError() string
- func LifeCycleCallBack(cPtr C.virConnectPtr, vPtr C.virDomainPtr, event C.int, detail C.int, ...)
- func StorageVolUpload(vol VirStorageVol, s VirStream, offset uint64, length uint64) error
- func VirFreeCallback(cData unsafe.Pointer)
- type GenericCallBackType
- type LifeCycleCallBackType
- type VirConnection
- func (c *VirConnection) ActiveDomainList() ([]VirDomain, error)
- func (c *VirConnection) CloseConnection() (int, error)
- func (c *VirConnection) CreateAndBootNewDomain(xml string) (VirDomain, error)
- func (c *VirConnection) CreateXML(xml string) (VirDomain, error)
- func (c *VirConnection) DefineXML(xml string) (VirDomain, error)
- func (c *VirConnection) InActiveDomainList() ([]VirDomain, error)
- func (c *VirConnection) IsAlive() (bool, error)
- func (c *VirConnection) ListAllDomains() ([]VirDomain, error)
- func (c *VirConnection) LookupByName(name string) (VirDomain, error)
- func (c *VirConnection) LookupByUUIDString(uuid string) (VirDomain, error)
- func (conn *VirConnection) LookupStorageVolByPath(name string) (VirStorageVol, error)
- func (c *VirConnection) NumOfActiveDomains() (int, error)
- func (c *VirConnection) NumOfInActiveDomains() (int, error)
- func (c *VirConnection) StoragePoolDefineXML(xml string) (VirStoragePool, error)
- func (c *VirConnection) StoragePoolLookupByName(name string) (VirStoragePool, error)
- func (c *VirConnection) StreamNew() (VirStream, error)
- type VirDomain
- func (d *VirDomain) Create() error
- func (d *VirDomain) Delete() error
- func (d *VirDomain) Destroy() error
- func (d *VirDomain) Free() error
- func (d *VirDomain) GetName() (string, error)
- func (d *VirDomain) GetUUIDString() (string, error)
- func (d *VirDomain) GetXMLDesc() (string, error)
- func (d *VirDomain) IsActive() bool
- func (d *VirDomain) Reboot(flags uint) error
- func (d *VirDomain) Shutdown() error
- type VirStoragePool
- func (p *VirStoragePool) Create() error
- func (p *VirStoragePool) Free() error
- func (p *VirStoragePool) IsActive() bool
- func (p *VirStoragePool) LookupStorageVolByName(name string) (VirStorageVol, error)
- func (p *VirStoragePool) StorageVolCreateXML(xmlConfig string, flags uint32) (VirStorageVol, error)
- type VirStorageVol
- type VirStream
Constants ¶
View Source
const ( /*type for lifecycle*/ VIR_DOMAIN_EVENT_DEFINED = int(C.VIR_DOMAIN_EVENT_DEFINED) VIR_DOMAIN_EVENT_UNDEFINE = int(C.VIR_DOMAIN_EVENT_UNDEFINED) VIR_DOMAIN_EVENT_STARTED = int(C.VIR_DOMAIN_EVENT_STARTED) VIR_DOMAIN_EVENT_SUSPENDE = int(C.VIR_DOMAIN_EVENT_SUSPENDED) VIR_DOMAIN_EVENT_RESUMED = int(C.VIR_DOMAIN_EVENT_RESUMED) VIR_DOMAIN_EVENT_STOPPED = int(C.VIR_DOMAIN_EVENT_STOPPED) VIR_DOMAIN_EVENT_SHUTDOWN = int(C.VIR_DOMAIN_EVENT_SHUTDOWN) /* event ID */ VIR_DOMAIN_EVENT_ID_LIFECYCLE = int(C.VIR_DOMAIN_EVENT_ID_LIFECYCLE) //LifeCycleCallBackType VIR_DOMAIN_EVENT_ID_REBOOT = int(C.VIR_DOMAIN_EVENT_ID_REBOOT) //GenericCallBackType )
Variables ¶
This section is empty.
Functions ¶
func ConnectDomainEventDeregister ¶
func ConnectDomainEventDeregister(conn VirConnection, callbackid int)
func ConnectDomainEventRegister ¶
func ConnectDomainEventRegister(conn VirConnection, domain VirDomain, event int, eventHandler interface{}) int
func EventRegisterDefaultImpl ¶
func EventRegisterDefaultImpl() error
func EventRunDefaultImpl ¶
func EventRunDefaultImpl() int
func GenericCallBack ¶
func GenericCallBack(cPtr C.virConnectPtr, vPtr C.virDomainPtr, cData unsafe.Pointer)
func GetLastError ¶
func GetLastError() string
func LifeCycleCallBack ¶
func LifeCycleCallBack(cPtr C.virConnectPtr, vPtr C.virDomainPtr, event C.int, detail C.int, cData unsafe.Pointer)
func StorageVolUpload ¶
func StorageVolUpload(vol VirStorageVol, s VirStream, offset uint64, length uint64) error
func VirFreeCallback ¶
Types ¶
type GenericCallBackType ¶
type GenericCallBackType func(c VirConnection, d VirDomain)
type LifeCycleCallBackType ¶
type LifeCycleCallBackType func(c VirConnection, d VirDomain, event int, detail int)
type VirConnection ¶
type VirConnection struct {
// contains filtered or unexported fields
}
func (*VirConnection) ActiveDomainList ¶
func (c *VirConnection) ActiveDomainList() ([]VirDomain, error)
func (*VirConnection) CloseConnection ¶
func (c *VirConnection) CloseConnection() (int, error)
func (*VirConnection) CreateAndBootNewDomain ¶
func (c *VirConnection) CreateAndBootNewDomain(xml string) (VirDomain, error)
func (*VirConnection) InActiveDomainList ¶
func (c *VirConnection) InActiveDomainList() ([]VirDomain, error)
func (*VirConnection) IsAlive ¶
func (c *VirConnection) IsAlive() (bool, error)
func (*VirConnection) ListAllDomains ¶
func (c *VirConnection) ListAllDomains() ([]VirDomain, error)
func (*VirConnection) LookupByName ¶
func (c *VirConnection) LookupByName(name string) (VirDomain, error)
func (*VirConnection) LookupByUUIDString ¶
func (c *VirConnection) LookupByUUIDString(uuid string) (VirDomain, error)
func (*VirConnection) LookupStorageVolByPath ¶
func (conn *VirConnection) LookupStorageVolByPath(name string) (VirStorageVol, error)
func (*VirConnection) NumOfActiveDomains ¶
func (c *VirConnection) NumOfActiveDomains() (int, error)
func (*VirConnection) NumOfInActiveDomains ¶
func (c *VirConnection) NumOfInActiveDomains() (int, error)
func (*VirConnection) StoragePoolDefineXML ¶
func (c *VirConnection) StoragePoolDefineXML(xml string) (VirStoragePool, error)
func (*VirConnection) StoragePoolLookupByName ¶
func (c *VirConnection) StoragePoolLookupByName(name string) (VirStoragePool, error)
func (*VirConnection) StreamNew ¶
func (c *VirConnection) StreamNew() (VirStream, error)
type VirDomain ¶
type VirDomain struct {
// contains filtered or unexported fields
}
func (*VirDomain) GetUUIDString ¶
func (*VirDomain) GetXMLDesc ¶
type VirStoragePool ¶
type VirStoragePool struct {
// contains filtered or unexported fields
}
func (*VirStoragePool) Create ¶
func (p *VirStoragePool) Create() error
func (*VirStoragePool) Free ¶
func (p *VirStoragePool) Free() error
func (*VirStoragePool) IsActive ¶
func (p *VirStoragePool) IsActive() bool
func (*VirStoragePool) LookupStorageVolByName ¶
func (p *VirStoragePool) LookupStorageVolByName(name string) (VirStorageVol, error)
func (*VirStoragePool) StorageVolCreateXML ¶
func (p *VirStoragePool) StorageVolCreateXML(xmlConfig string, flags uint32) (VirStorageVol, error)
type VirStorageVol ¶
type VirStorageVol struct {
// contains filtered or unexported fields
}
func (*VirStorageVol) Delete ¶
func (v *VirStorageVol) Delete() error
func (*VirStorageVol) Free ¶
func (v *VirStorageVol) Free() error
func (*VirStorageVol) GetPath ¶
func (v *VirStorageVol) GetPath() (string, error)
Click to show internal directories.
Click to hide internal directories.