libvirt

package
v0.0.0-...-034f4d6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2014 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

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

func VirFreeCallback(cData unsafe.Pointer)

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 NewVirConnection

func NewVirConnection(uri string) (VirConnection, error)

virtual connection

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) CreateXML

func (c *VirConnection) CreateXML(xml string) (VirDomain, error)

func (*VirConnection) DefineXML

func (c *VirConnection) DefineXML(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) Create

func (d *VirDomain) Create() error

virtual domain

func (*VirDomain) Delete

func (d *VirDomain) Delete() error

func (*VirDomain) Destroy

func (d *VirDomain) Destroy() error

func (*VirDomain) Free

func (d *VirDomain) Free() error

func (*VirDomain) GetName

func (d *VirDomain) GetName() (string, error)

func (*VirDomain) GetUUIDString

func (d *VirDomain) GetUUIDString() (string, error)

func (*VirDomain) GetXMLDesc

func (d *VirDomain) GetXMLDesc() (string, error)

func (*VirDomain) IsActive

func (d *VirDomain) IsActive() bool

func (*VirDomain) Reboot

func (d *VirDomain) Reboot(flags uint) error

func (*VirDomain) Shutdown

func (d *VirDomain) Shutdown() error

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)

type VirStream

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

func (*VirStream) Abort

func (s *VirStream) Abort() error

func (*VirStream) Finish

func (s *VirStream) Finish() error

func (*VirStream) Free

func (s *VirStream) Free() error

func (*VirStream) Send

func (s *VirStream) Send(data []byte, size int) int

Jump to

Keyboard shortcuts

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