Documentation ¶
Index ¶
- type BlockJob
- type CPUInstanceProperties
- type Command
- type Error
- type Event
- type HmpMonitor
- func (m *HmpMonitor) AddCpu(cpuIndex int, callback StringCallback)
- func (m *HmpMonitor) BlockIoThrottle(driveName string, bps, iops int64, callback StringCallback)
- func (m *HmpMonitor) BlockJobComplete(drive string, callback StringCallback)
- func (m *HmpMonitor) BlockReopenImage(drive, newImagePath, format string, cb StringCallback)
- func (m *HmpMonitor) BlockStream(drive string, callback StringCallback)
- func (m *HmpMonitor) CancelBlockJob(driveName string, force bool, callback StringCallback)
- func (m *HmpMonitor) ChangeCdrom(dev string, path string, callback StringCallback)
- func (m *HmpMonitor) Connect(host string, port int) error
- func (m *HmpMonitor) ConnectWithSocket(address string) error
- func (m *HmpMonitor) DeviceAdd(dev string, params map[string]string, callback StringCallback)
- func (m *HmpMonitor) DeviceDel(idstr string, callback StringCallback)
- func (m *HmpMonitor) DriveAdd(bus, node string, params map[string]string, callback StringCallback)
- func (m *HmpMonitor) DriveBackup(callback StringCallback, drive, target, syncMode, format string)
- func (m *HmpMonitor) DriveDel(idstr string, callback StringCallback)
- func (m *HmpMonitor) DriveMirror(callback StringCallback, drive, target, syncMode, format string, ...)
- func (m *HmpMonitor) EjectCdrom(dev string, callback StringCallback)
- func (m *HmpMonitor) GeMemtSlotIndex(callback func(index int))
- func (m *HmpMonitor) GetBlockJobCounts(callback func(jobs int))
- func (m *HmpMonitor) GetBlockJobs(callback func([]BlockJob))
- func (m *HmpMonitor) GetBlocks(callback func([]QemuBlock))
- func (m *HmpMonitor) GetCpuCount(callback func(count int))
- func (m *HmpMonitor) GetHotPluggableCpus(callback HotpluggableCPUListCallback)
- func (m *HmpMonitor) GetMemdevList(callback MemdevListCallback)
- func (m *HmpMonitor) GetMemoryDevicesInfo(cb QueryMemoryDevicesCallback)
- func (m *HmpMonitor) GetMigrateStats(callback MigrateStatsCallback)
- func (m *HmpMonitor) GetMigrateStatus(callback StringCallback)
- func (m *HmpMonitor) GetVersion(callback StringCallback)
- func (m *HmpMonitor) HumanMonitorCommand(cmd string, callback StringCallback)
- func (m *HmpMonitor) InfoQtree(cb StringCallback)
- func (m *HmpMonitor) Migrate(destStr string, copyIncremental, copyFull bool, callback StringCallback)
- func (m *HmpMonitor) MigrateCancel(cb StringCallback)
- func (m *HmpMonitor) MigrateContinue(state string, callback StringCallback)
- func (m *HmpMonitor) MigrateIncoming(address string, callback StringCallback)
- func (m *HmpMonitor) MigrateSetCapability(capability, state string, callback StringCallback)
- func (m *HmpMonitor) MigrateSetDowntime(dtSec float64, callback StringCallback)
- func (m *HmpMonitor) MigrateSetParameter(key string, val interface{}, callback StringCallback)
- func (m *HmpMonitor) MigrateStartPostcopy(callback StringCallback)
- func (m *HmpMonitor) NetdevAdd(id, netType string, params map[string]string, callback StringCallback)
- func (m *HmpMonitor) NetdevDel(id string, callback StringCallback)
- func (m *HmpMonitor) ObjectAdd(objectType string, params map[string]string, callback StringCallback)
- func (m *HmpMonitor) ObjectDel(idstr string, callback StringCallback)
- func (m *HmpMonitor) Query(cmd string, cb StringCallback)
- func (m *HmpMonitor) QueryMachines(callback QueryMachinesCallback)
- func (m *HmpMonitor) QueryPci(callback QueryPciCallback)
- func (m *HmpMonitor) QueryStatus(callback StringCallback)
- func (m *HmpMonitor) Quit(cb StringCallback)
- func (m *HmpMonitor) ReloadDiskBlkdev(device, path string, callback StringCallback)
- func (m *HmpMonitor) ResizeDisk(driveName string, sizeMB int64, callback StringCallback)
- func (m *HmpMonitor) SaveState(stateFilePath string, callback StringCallback)
- func (m *HmpMonitor) SetVncPassword(proto, password string, callback StringCallback)
- func (m *HmpMonitor) SimpleCommand(cmd string, callback StringCallback)
- func (m *HmpMonitor) SnapshotBlkdev(drive, newImagePath, format string, reuse bool, cb StringCallback)
- func (m *HmpMonitor) StartNbdServer(port int, exportAllDevice, writable bool, callback StringCallback)
- func (m *HmpMonitor) StopNbdServer(callback StringCallback)
- func (m *HmpMonitor) XBlockdevChange(parent, node, child string, callback StringCallback)
- type HotpluggableCPU
- type HotpluggableCPUListCallback
- type MachineInfo
- type Memdev
- type MemdevListCallback
- type MemoryDeviceInfo
- type MigrateStatsCallback
- type MigrationInfo
- type MigrationStats
- type MigrationStatus
- type Monitor
- type MonitorErrorFunc
- type MonitorSuccFunc
- type NetworkModify
- type PCIBridgeInfo
- type PCIBusInfo
- type PCIDeviceClass
- type PCIDeviceID
- type PCIDeviceInfo
- type PCIInfo
- type PCIMemoryRange
- type PCIMemoryRegion
- type PcdimmDeviceInfo
- type QemuBlock
- type QmpMonitor
- func (m *QmpMonitor) AddCpu(cpuIndex int, callback StringCallback)
- func (m *QmpMonitor) BlockIoThrottle(driveName string, bps, iops int64, callback StringCallback)
- func (m *QmpMonitor) BlockJobComplete(drive string, callback StringCallback)
- func (m *QmpMonitor) BlockReopenImage(drive, newImagePath, format string, callback StringCallback)
- func (m *QmpMonitor) BlockStream(drive string, callback StringCallback)
- func (m *QmpMonitor) CancelBlockJob(driveName string, force bool, callback StringCallback)
- func (m *QmpMonitor) ChangeCdrom(dev string, path string, callback StringCallback)
- func (m *QmpMonitor) Connect(host string, port int) error
- func (m *QmpMonitor) ConnectWithSocket(address string, timeout time.Duration) error
- func (m *QmpMonitor) DeviceAdd(dev string, params map[string]string, callback StringCallback)
- func (m *QmpMonitor) DeviceDel(idstr string, callback StringCallback)
- func (m *QmpMonitor) DriveAdd(bus, node string, params map[string]string, callback StringCallback)
- func (m *QmpMonitor) DriveBackup(callback StringCallback, drive, target, syncMode, format string)
- func (m *QmpMonitor) DriveDel(idstr string, callback StringCallback)
- func (m *QmpMonitor) DriveMirror(callback StringCallback, drive, target, syncMode, format string, ...)
- func (m *QmpMonitor) EjectCdrom(dev string, callback StringCallback)
- func (m *QmpMonitor) GeMemtSlotIndex(callback func(index int))
- func (m *QmpMonitor) GetBlockJobCounts(callback func(jobs int))
- func (m *QmpMonitor) GetBlockJobs(callback func([]BlockJob))
- func (m *QmpMonitor) GetBlocks(callback func([]QemuBlock))
- func (m *QmpMonitor) GetCpuCount(callback func(count int))
- func (m *QmpMonitor) GetHotPluggableCpus(callback HotpluggableCPUListCallback)
- func (m *QmpMonitor) GetMemdevList(callback MemdevListCallback)
- func (m *QmpMonitor) GetMemoryDevicesInfo(callback QueryMemoryDevicesCallback)
- func (m *QmpMonitor) GetMigrateStats(callback MigrateStatsCallback)
- func (m *QmpMonitor) GetMigrateStatus(callback StringCallback)
- func (m *QmpMonitor) GetVersion(callback StringCallback)
- func (m *QmpMonitor) HumanMonitorCommand(cmd string, callback StringCallback)
- func (m *QmpMonitor) InfoQtree(cb StringCallback)
- func (m *QmpMonitor) Migrate(destStr string, copyIncremental, copyFull bool, callback StringCallback)
- func (m *QmpMonitor) MigrateCancel(cb StringCallback)
- func (m *QmpMonitor) MigrateContinue(state string, callback StringCallback)
- func (m *QmpMonitor) MigrateIncoming(address string, callback StringCallback)
- func (m *QmpMonitor) MigrateSetCapability(capability, state string, callback StringCallback)
- func (m *QmpMonitor) MigrateSetDowntime(dtSec float64, callback StringCallback)
- func (m *QmpMonitor) MigrateSetParameter(key string, val interface{}, callback StringCallback)
- func (m *QmpMonitor) MigrateStartPostcopy(callback StringCallback)
- func (m *QmpMonitor) NetdevAdd(id, netType string, params map[string]string, callback StringCallback)
- func (m *QmpMonitor) NetdevDel(id string, callback StringCallback)
- func (m *QmpMonitor) ObjectAdd(objectType string, params map[string]string, callback StringCallback)
- func (m *QmpMonitor) ObjectDel(idstr string, callback StringCallback)
- func (m *QmpMonitor) QemuMonitorCommand(rawCmd string, callback StringCallback) error
- func (m *QmpMonitor) Query(cmd *Command, cb qmpMonitorCallBack)
- func (m *QmpMonitor) QueryMachines(callback QueryMachinesCallback)
- func (m *QmpMonitor) QueryPci(callback QueryPciCallback)
- func (m *QmpMonitor) QueryStatus(callback StringCallback)
- func (m *QmpMonitor) Quit(callback StringCallback)
- func (m *QmpMonitor) ReloadDiskBlkdev(device, path string, callback StringCallback)
- func (m *QmpMonitor) ResizeDisk(driveName string, sizeMB int64, callback StringCallback)
- func (m *QmpMonitor) SaveState(stateFilePath string, callback StringCallback)
- func (m *QmpMonitor) SetVncPassword(proto, password string, callback StringCallback)
- func (m *QmpMonitor) SimpleCommand(cmd string, callback StringCallback)
- func (m *QmpMonitor) SnapshotBlkdev(drive, newImagePath, format string, reuse bool, callback StringCallback)
- func (m *QmpMonitor) StartNbdServer(port int, exportAllDevice, writable bool, callback StringCallback)
- func (m *QmpMonitor) StopNbdServer(callback StringCallback)
- func (m *QmpMonitor) XBlockdevChange(parent, node, child string, callback StringCallback)
- type QueryMachinesCallback
- type QueryMemoryDevicesCallback
- type QueryPciCallback
- type Response
- type SBaseMonitor
- func (m *SBaseMonitor) Connect(host string, port int) error
- func (m *SBaseMonitor) ConnectWithSocket(address string) error
- func (m *SBaseMonitor) Disconnect()
- func (m *SBaseMonitor) IsConnected() bool
- func (m *SBaseMonitor) QemuMonitorCommand(cmd string, callback StringCallback) error
- func (m *SBaseMonitor) SetReadDeadlineTimeout(duration time.Duration)
- type StringCallback
- type Timestamp
- type Version
- type XbzrleCacheStats
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockJob ¶
type BlockJob struct { Busy bool // commit| Type string Len int64 Paused bool Ready bool // running|ready Status string // ok| IoStatus string `json:"io-status"` Offset int64 Device string Speed int64 Start time.Time PreOffset int64 Now time.Time SpeedMbps float64 // contains filtered or unexported fields }
func (*BlockJob) CalcOffset ¶
type CPUInstanceProperties ¶
type CPUInstanceProperties struct { NodeID *int64 `json:"node-id,omitempty"` SocketID *int64 `json:"socket-id,omitempty"` CoreID *int64 `json:"core-id,omitempty"` ThreadID *int64 `json:"thread-id,omitempty"` }
CPUInstanceProperties implements the "CpuInstanceProperties" QMP API type.
type Command ¶
type Command struct { Execute string `json:"execute"` Args interface{} `json:"arguments,omitempty"` }
type Event ¶
type HmpMonitor ¶
type HmpMonitor struct { SBaseMonitor // contains filtered or unexported fields }
func NewHmpMonitor ¶
func NewHmpMonitor(server, sid string, OnMonitorDisConnect, OnMonitorTimeout MonitorErrorFunc, OnMonitorConnected MonitorSuccFunc) *HmpMonitor
func (*HmpMonitor) AddCpu ¶
func (m *HmpMonitor) AddCpu(cpuIndex int, callback StringCallback)
func (*HmpMonitor) BlockIoThrottle ¶
func (m *HmpMonitor) BlockIoThrottle(driveName string, bps, iops int64, callback StringCallback)
func (*HmpMonitor) BlockJobComplete ¶
func (m *HmpMonitor) BlockJobComplete(drive string, callback StringCallback)
func (*HmpMonitor) BlockReopenImage ¶
func (m *HmpMonitor) BlockReopenImage(drive, newImagePath, format string, cb StringCallback)
func (*HmpMonitor) BlockStream ¶
func (m *HmpMonitor) BlockStream(drive string, callback StringCallback)
func (*HmpMonitor) CancelBlockJob ¶
func (m *HmpMonitor) CancelBlockJob(driveName string, force bool, callback StringCallback)
func (*HmpMonitor) ChangeCdrom ¶
func (m *HmpMonitor) ChangeCdrom(dev string, path string, callback StringCallback)
func (*HmpMonitor) ConnectWithSocket ¶
func (m *HmpMonitor) ConnectWithSocket(address string) error
func (*HmpMonitor) DeviceAdd ¶
func (m *HmpMonitor) DeviceAdd(dev string, params map[string]string, callback StringCallback)
func (*HmpMonitor) DeviceDel ¶
func (m *HmpMonitor) DeviceDel(idstr string, callback StringCallback)
func (*HmpMonitor) DriveAdd ¶
func (m *HmpMonitor) DriveAdd(bus, node string, params map[string]string, callback StringCallback)
func (*HmpMonitor) DriveBackup ¶
func (m *HmpMonitor) DriveBackup(callback StringCallback, drive, target, syncMode, format string)
func (*HmpMonitor) DriveDel ¶
func (m *HmpMonitor) DriveDel(idstr string, callback StringCallback)
func (*HmpMonitor) DriveMirror ¶
func (m *HmpMonitor) DriveMirror(callback StringCallback, drive, target, syncMode, format string, unmap, blockReplication bool, speed int64)
func (*HmpMonitor) EjectCdrom ¶
func (m *HmpMonitor) EjectCdrom(dev string, callback StringCallback)
func (*HmpMonitor) GeMemtSlotIndex ¶
func (m *HmpMonitor) GeMemtSlotIndex(callback func(index int))
func (*HmpMonitor) GetBlockJobCounts ¶
func (m *HmpMonitor) GetBlockJobCounts(callback func(jobs int))
func (*HmpMonitor) GetBlockJobs ¶
func (m *HmpMonitor) GetBlockJobs(callback func([]BlockJob))
func (*HmpMonitor) GetBlocks ¶
func (m *HmpMonitor) GetBlocks(callback func([]QemuBlock))
func (*HmpMonitor) GetCpuCount ¶
func (m *HmpMonitor) GetCpuCount(callback func(count int))
func (*HmpMonitor) GetHotPluggableCpus ¶
func (m *HmpMonitor) GetHotPluggableCpus(callback HotpluggableCPUListCallback)
func (*HmpMonitor) GetMemdevList ¶
func (m *HmpMonitor) GetMemdevList(callback MemdevListCallback)
func (*HmpMonitor) GetMemoryDevicesInfo ¶
func (m *HmpMonitor) GetMemoryDevicesInfo(cb QueryMemoryDevicesCallback)
func (*HmpMonitor) GetMigrateStats ¶
func (m *HmpMonitor) GetMigrateStats(callback MigrateStatsCallback)
func (*HmpMonitor) GetMigrateStatus ¶
func (m *HmpMonitor) GetMigrateStatus(callback StringCallback)
func (*HmpMonitor) GetVersion ¶
func (m *HmpMonitor) GetVersion(callback StringCallback)
func (*HmpMonitor) HumanMonitorCommand ¶
func (m *HmpMonitor) HumanMonitorCommand(cmd string, callback StringCallback)
func (*HmpMonitor) InfoQtree ¶
func (m *HmpMonitor) InfoQtree(cb StringCallback)
func (*HmpMonitor) Migrate ¶
func (m *HmpMonitor) Migrate( destStr string, copyIncremental, copyFull bool, callback StringCallback, )
func (*HmpMonitor) MigrateCancel ¶
func (m *HmpMonitor) MigrateCancel(cb StringCallback)
func (*HmpMonitor) MigrateContinue ¶
func (m *HmpMonitor) MigrateContinue(state string, callback StringCallback)
func (*HmpMonitor) MigrateIncoming ¶
func (m *HmpMonitor) MigrateIncoming(address string, callback StringCallback)
func (*HmpMonitor) MigrateSetCapability ¶
func (m *HmpMonitor) MigrateSetCapability(capability, state string, callback StringCallback)
func (*HmpMonitor) MigrateSetDowntime ¶
func (m *HmpMonitor) MigrateSetDowntime(dtSec float64, callback StringCallback)
func (*HmpMonitor) MigrateSetParameter ¶
func (m *HmpMonitor) MigrateSetParameter(key string, val interface{}, callback StringCallback)
func (*HmpMonitor) MigrateStartPostcopy ¶
func (m *HmpMonitor) MigrateStartPostcopy(callback StringCallback)
func (*HmpMonitor) NetdevAdd ¶
func (m *HmpMonitor) NetdevAdd(id, netType string, params map[string]string, callback StringCallback)
func (*HmpMonitor) NetdevDel ¶
func (m *HmpMonitor) NetdevDel(id string, callback StringCallback)
func (*HmpMonitor) ObjectAdd ¶
func (m *HmpMonitor) ObjectAdd(objectType string, params map[string]string, callback StringCallback)
func (*HmpMonitor) ObjectDel ¶
func (m *HmpMonitor) ObjectDel(idstr string, callback StringCallback)
func (*HmpMonitor) Query ¶
func (m *HmpMonitor) Query(cmd string, cb StringCallback)
func (*HmpMonitor) QueryMachines ¶
func (m *HmpMonitor) QueryMachines(callback QueryMachinesCallback)
func (*HmpMonitor) QueryPci ¶
func (m *HmpMonitor) QueryPci(callback QueryPciCallback)
func (*HmpMonitor) QueryStatus ¶
func (m *HmpMonitor) QueryStatus(callback StringCallback)
func (*HmpMonitor) Quit ¶
func (m *HmpMonitor) Quit(cb StringCallback)
func (*HmpMonitor) ReloadDiskBlkdev ¶
func (m *HmpMonitor) ReloadDiskBlkdev(device, path string, callback StringCallback)
func (*HmpMonitor) ResizeDisk ¶
func (m *HmpMonitor) ResizeDisk(driveName string, sizeMB int64, callback StringCallback)
func (*HmpMonitor) SaveState ¶
func (m *HmpMonitor) SaveState(stateFilePath string, callback StringCallback)
func (*HmpMonitor) SetVncPassword ¶
func (m *HmpMonitor) SetVncPassword(proto, password string, callback StringCallback)
func (*HmpMonitor) SimpleCommand ¶
func (m *HmpMonitor) SimpleCommand(cmd string, callback StringCallback)
func (*HmpMonitor) SnapshotBlkdev ¶
func (m *HmpMonitor) SnapshotBlkdev(drive, newImagePath, format string, reuse bool, cb StringCallback)
func (*HmpMonitor) StartNbdServer ¶
func (m *HmpMonitor) StartNbdServer(port int, exportAllDevice, writable bool, callback StringCallback)
func (*HmpMonitor) StopNbdServer ¶
func (m *HmpMonitor) StopNbdServer(callback StringCallback)
func (*HmpMonitor) XBlockdevChange ¶
func (m *HmpMonitor) XBlockdevChange(parent, node, child string, callback StringCallback)
type HotpluggableCPU ¶
type HotpluggableCPU struct { Type string `json:"type"` VcpusCount int64 `json:"vcpus-count"` Props CPUInstanceProperties `json:"props"` QomPath *string `json:"qom-path,omitempty"` }
HotpluggableCPU implements the "HotpluggableCPU" QMP API type.
type HotpluggableCPUListCallback ¶
type HotpluggableCPUListCallback func(res []HotpluggableCPU, err string)
type MachineInfo ¶
type MachineInfo struct { Name string `json:"name"` Alias *string `json:"alias,omitempty"` IsDefault *bool `json:"is-default,omitempty"` CPUMax int64 `json:"cpu-max"` HotpluggableCpus bool `json:"hotpluggable-cpus"` }
MachineInfo implements the "MachineInfo" QMP API type.
type Memdev ¶
type Memdev struct { ID *string `json:"id,omitempty"` Size uint64 `json:"size"` Merge bool `json:"merge"` Dump bool `json:"dump"` Prealloc bool `json:"prealloc"` HostNodes []uint16 `json:"host-nodes"` Policy string `json:"policy"` }
Memdev implements the "Memdev" QMP API type.
type MemdevListCallback ¶
type MemoryDeviceInfo ¶
type MemoryDeviceInfo struct { Type string Data PcdimmDeviceInfo }
type MigrateStatsCallback ¶
type MigrateStatsCallback func(*MigrationInfo, error)
type MigrationInfo ¶
type MigrationInfo struct { Status *MigrationStatus `json:"status,omitempty"` RAM *MigrationStats `json:"ram,omitempty"` Disk *MigrationStats `json:"disk,omitempty"` XbzrleCache *XbzrleCacheStats `json:"xbzrle-cache,omitempty"` TotalTime *int64 `json:"total-time,omitempty"` ExpectedDowntime *int64 `json:"expected-downtime,omitempty"` Downtime *int64 `json:"downtime,omitempty"` SetupTime *int64 `json:"setup-time,omitempty"` CPUThrottlePercentage *int64 `json:"cpu-throttle-percentage,omitempty"` ErrorDesc *string `json:"error-desc,omitempty"` }
type MigrationStats ¶
type MigrationStats struct { Transferred int64 `json:"transferred"` Remaining int64 `json:"remaining"` Total int64 `json:"total"` Duplicate int64 `json:"duplicate"` Skipped int64 `json:"skipped"` Normal int64 `json:"normal"` NormalBytes int64 `json:"normal-bytes"` DirtyPagesRate int64 `json:"dirty-pages-rate"` Mbps float64 `json:"mbps"` DirtySyncCount int64 `json:"dirty-sync-count"` PostcopyRequests int64 `json:"postcopy-requests"` PageSize int64 `json:"page-size"` }
type MigrationStatus ¶
type MigrationStatus string
MigrationStatus implements the "MigrationStatus" QMP API type.
type Monitor ¶
type Monitor interface { Connect(host string, port int) error ConnectWithSocket(address string, timeout time.Duration) error Disconnect() IsConnected() bool // The callback function will be called in another goroutine SimpleCommand(cmd string, callback StringCallback) HumanMonitorCommand(cmd string, callback StringCallback) QemuMonitorCommand(cmd string, callback StringCallback) error QueryStatus(StringCallback) GetVersion(StringCallback) GetBlockJobCounts(func(jobs int)) GetBlockJobs(func([]BlockJob)) QueryPci(callback QueryPciCallback) InfoQtree(cb StringCallback) GetCpuCount(func(count int)) AddCpu(cpuIndex int, callback StringCallback) GetHotPluggableCpus(HotpluggableCPUListCallback) GeMemtSlotIndex(func(index int)) GetMemoryDevicesInfo(QueryMemoryDevicesCallback) GetMemdevList(MemdevListCallback) GetBlocks(callback func([]QemuBlock)) EjectCdrom(dev string, callback StringCallback) ChangeCdrom(dev string, path string, callback StringCallback) DriveDel(idstr string, callback StringCallback) DeviceDel(idstr string, callback StringCallback) ObjectDel(idstr string, callback StringCallback) ObjectAdd(objectType string, params map[string]string, callback StringCallback) DriveAdd(bus, node string, params map[string]string, callback StringCallback) DeviceAdd(dev string, params map[string]string, callback StringCallback) XBlockdevChange(parent, node, child string, callback StringCallback) BlockStream(drive string, callback StringCallback) DriveMirror(callback StringCallback, drive, target, syncMode, format string, unmap, blockReplication bool, speed int64) DriveBackup(callback StringCallback, drive, target, syncMode, format string) BlockJobComplete(drive string, cb StringCallback) BlockReopenImage(drive, newImagePath, format string, cb StringCallback) SnapshotBlkdev(drive, newImagePath, format string, reuse bool, cb StringCallback) MigrateSetDowntime(dtSec float64, callback StringCallback) MigrateSetCapability(capability, state string, callback StringCallback) MigrateSetParameter(key string, val interface{}, callback StringCallback) MigrateIncoming(address string, callback StringCallback) Migrate(destStr string, copyIncremental, copyFull bool, callback StringCallback) MigrateContinue(state string, callback StringCallback) GetMigrateStatus(callback StringCallback) MigrateStartPostcopy(callback StringCallback) GetMigrateStats(callback MigrateStatsCallback) MigrateCancel(cb StringCallback) ReloadDiskBlkdev(device, path string, callback StringCallback) SetVncPassword(proto, password string, callback StringCallback) StartNbdServer(port int, exportAllDevice, writable bool, callback StringCallback) StopNbdServer(callback StringCallback) ResizeDisk(driveName string, sizeMB int64, callback StringCallback) BlockIoThrottle(driveName string, bps, iops int64, callback StringCallback) CancelBlockJob(driveName string, force bool, callback StringCallback) NetdevAdd(id, netType string, params map[string]string, callback StringCallback) NetdevDel(id string, callback StringCallback) SaveState(statFilePath string, callback StringCallback) QueryMachines(callback QueryMachinesCallback) Quit(StringCallback) }
type MonitorErrorFunc ¶
type MonitorErrorFunc func(error)
type MonitorSuccFunc ¶
type MonitorSuccFunc func()
type NetworkModify ¶
type PCIBridgeInfo ¶
type PCIBridgeInfo struct { Bus PCIBusInfo `json:"bus"` Devices []PCIDeviceInfo `json:"devices,omitempty"` }
PCIBridgeInfo implements the "PciBridgeInfo" QMP API type.
type PCIBusInfo ¶
type PCIBusInfo struct { Number int64 `json:"number"` Secondary int64 `json:"secondary"` Subordinate int64 `json:"subordinate"` IORange PCIMemoryRange `json:"io_range"` MemoryRange PCIMemoryRange `json:"memory_range"` PrefetchableRange PCIMemoryRange `json:"prefetchable_range"` }
PCIBusInfo implements the "PciBusInfo" QMP API type.
type PCIDeviceClass ¶
PCIDeviceClass implements the "PciDeviceClass" QMP API type.
type PCIDeviceID ¶
PCIDeviceID implements the "PciDeviceId" QMP API type.
type PCIDeviceInfo ¶
type PCIDeviceInfo struct { Bus int64 `json:"bus"` Slot int64 `json:"slot"` Function int64 `json:"function"` ClassInfo PCIDeviceClass `json:"class_info"` ID PCIDeviceID `json:"id"` Irq *int64 `json:"irq,omitempty"` QdevID string `json:"qdev_id"` PCIBridge *PCIBridgeInfo `json:"pci_bridge,omitempty"` Regions []PCIMemoryRegion `json:"regions"` }
PCIDeviceInfo implements the "PciDeviceInfo" QMP API type.
type PCIInfo ¶
type PCIInfo struct { Bus int64 `json:"bus"` Devices []PCIDeviceInfo `json:"devices"` }
PCIInfo implements the "PciInfo" QMP API type.
type PCIMemoryRange ¶
PCIMemoryRange implements the "PciMemoryRange" QMP API type.
type PCIMemoryRegion ¶
type PCIMemoryRegion struct { Bar int64 `json:"bar"` Type string `json:"type"` Address int64 `json:"address"` Size int64 `json:"size"` Prefetch *bool `json:"prefetch,omitempty"` MemType64 *bool `json:"mem_type_64,omitempty"` }
PCIMemoryRegion implements the "PciMemoryRegion" QMP API type.
type PcdimmDeviceInfo ¶
type QemuBlock ¶
type QemuBlock struct { IoStatus string `json:"io-status"` Device string Locked bool Removable bool Qdev string TrayOpen bool Type string Inserted struct { Ro bool Drv string Encrypted bool File string BackingFile string BackingFileDepth int Bps int64 BpsRd int64 BpsWr int Iops int64 IopsRd int IopsWr int BpsMax int64 BpsRdMax int64 BpsWrMax int64 IopsMax int IopsRdMax int IopsWrMax int IopsSize int64 DetectZeroes string WriteThreshold int Image struct { Filename string Format string VirtualSize int64 `json:"virtual-size"` BackingFile string FullBackingFilename string `json:"full-backing-filename"` BackingFilenameFormat string `json:"backing-filename-format"` Snapshots []struct { Id string Name string VmStateSize int `json:"vm-state-size"` DateSec int64 `json:"date-sec"` DateNsec int `json:"date-nsec"` VmClockSec int `json:"vm-clock-sec"` VmClockNsec int `json:"vm-clock-nsec"` } BackingImage struct { VirtualSize int64 `json:"virtual-size"` // contains filtered or unexported fields } `json:"backing-image"` } } }
type QmpMonitor ¶
type QmpMonitor struct { SBaseMonitor // contains filtered or unexported fields }
func NewQmpMonitor ¶
func NewQmpMonitor(server, sid string, OnMonitorDisConnect, OnMonitorTimeout MonitorErrorFunc, OnMonitorConnected MonitorSuccFunc, qmpEventFunc qmpEventCallback) *QmpMonitor
func (*QmpMonitor) AddCpu ¶
func (m *QmpMonitor) AddCpu(cpuIndex int, callback StringCallback)
func (*QmpMonitor) BlockIoThrottle ¶
func (m *QmpMonitor) BlockIoThrottle(driveName string, bps, iops int64, callback StringCallback)
func (*QmpMonitor) BlockJobComplete ¶
func (m *QmpMonitor) BlockJobComplete(drive string, callback StringCallback)
func (*QmpMonitor) BlockReopenImage ¶
func (m *QmpMonitor) BlockReopenImage(drive, newImagePath, format string, callback StringCallback)
func (*QmpMonitor) BlockStream ¶
func (m *QmpMonitor) BlockStream(drive string, callback StringCallback)
func (*QmpMonitor) CancelBlockJob ¶
func (m *QmpMonitor) CancelBlockJob(driveName string, force bool, callback StringCallback)
func (*QmpMonitor) ChangeCdrom ¶
func (m *QmpMonitor) ChangeCdrom(dev string, path string, callback StringCallback)
func (*QmpMonitor) ConnectWithSocket ¶
func (m *QmpMonitor) ConnectWithSocket(address string, timeout time.Duration) error
func (*QmpMonitor) DeviceAdd ¶
func (m *QmpMonitor) DeviceAdd(dev string, params map[string]string, callback StringCallback)
func (*QmpMonitor) DeviceDel ¶
func (m *QmpMonitor) DeviceDel(idstr string, callback StringCallback)
func (*QmpMonitor) DriveAdd ¶
func (m *QmpMonitor) DriveAdd(bus, node string, params map[string]string, callback StringCallback)
func (*QmpMonitor) DriveBackup ¶
func (m *QmpMonitor) DriveBackup(callback StringCallback, drive, target, syncMode, format string)
func (*QmpMonitor) DriveDel ¶
func (m *QmpMonitor) DriveDel(idstr string, callback StringCallback)
func (*QmpMonitor) DriveMirror ¶
func (m *QmpMonitor) DriveMirror(callback StringCallback, drive, target, syncMode, format string, unmap, blockReplication bool, speed int64)
func (*QmpMonitor) EjectCdrom ¶
func (m *QmpMonitor) EjectCdrom(dev string, callback StringCallback)
func (*QmpMonitor) GeMemtSlotIndex ¶
func (m *QmpMonitor) GeMemtSlotIndex(callback func(index int))
func (*QmpMonitor) GetBlockJobCounts ¶
func (m *QmpMonitor) GetBlockJobCounts(callback func(jobs int))
func (*QmpMonitor) GetBlockJobs ¶
func (m *QmpMonitor) GetBlockJobs(callback func([]BlockJob))
func (*QmpMonitor) GetBlocks ¶
func (m *QmpMonitor) GetBlocks(callback func([]QemuBlock))
func (*QmpMonitor) GetCpuCount ¶
func (m *QmpMonitor) GetCpuCount(callback func(count int))
func (*QmpMonitor) GetHotPluggableCpus ¶
func (m *QmpMonitor) GetHotPluggableCpus(callback HotpluggableCPUListCallback)
func (*QmpMonitor) GetMemdevList ¶
func (m *QmpMonitor) GetMemdevList(callback MemdevListCallback)
func (*QmpMonitor) GetMemoryDevicesInfo ¶
func (m *QmpMonitor) GetMemoryDevicesInfo(callback QueryMemoryDevicesCallback)
func (*QmpMonitor) GetMigrateStats ¶
func (m *QmpMonitor) GetMigrateStats(callback MigrateStatsCallback)
func (*QmpMonitor) GetMigrateStatus ¶
func (m *QmpMonitor) GetMigrateStatus(callback StringCallback)
func (*QmpMonitor) GetVersion ¶
func (m *QmpMonitor) GetVersion(callback StringCallback)
If get version error, callback with empty string
func (*QmpMonitor) HumanMonitorCommand ¶
func (m *QmpMonitor) HumanMonitorCommand(cmd string, callback StringCallback)
func (*QmpMonitor) InfoQtree ¶
func (m *QmpMonitor) InfoQtree(cb StringCallback)
func (*QmpMonitor) Migrate ¶
func (m *QmpMonitor) Migrate( destStr string, copyIncremental, copyFull bool, callback StringCallback, )
func (*QmpMonitor) MigrateCancel ¶
func (m *QmpMonitor) MigrateCancel(cb StringCallback)
func (*QmpMonitor) MigrateContinue ¶
func (m *QmpMonitor) MigrateContinue(state string, callback StringCallback)
func (*QmpMonitor) MigrateIncoming ¶
func (m *QmpMonitor) MigrateIncoming(address string, callback StringCallback)
func (*QmpMonitor) MigrateSetCapability ¶
func (m *QmpMonitor) MigrateSetCapability(capability, state string, callback StringCallback)
func (*QmpMonitor) MigrateSetDowntime ¶
func (m *QmpMonitor) MigrateSetDowntime(dtSec float64, callback StringCallback)
func (*QmpMonitor) MigrateSetParameter ¶
func (m *QmpMonitor) MigrateSetParameter(key string, val interface{}, callback StringCallback)
func (*QmpMonitor) MigrateStartPostcopy ¶
func (m *QmpMonitor) MigrateStartPostcopy(callback StringCallback)
func (*QmpMonitor) NetdevAdd ¶
func (m *QmpMonitor) NetdevAdd(id, netType string, params map[string]string, callback StringCallback)
func (*QmpMonitor) NetdevDel ¶
func (m *QmpMonitor) NetdevDel(id string, callback StringCallback)
func (*QmpMonitor) ObjectAdd ¶
func (m *QmpMonitor) ObjectAdd(objectType string, params map[string]string, callback StringCallback)
func (*QmpMonitor) ObjectDel ¶
func (m *QmpMonitor) ObjectDel(idstr string, callback StringCallback)
func (*QmpMonitor) QemuMonitorCommand ¶
func (m *QmpMonitor) QemuMonitorCommand(rawCmd string, callback StringCallback) error
func (*QmpMonitor) Query ¶
func (m *QmpMonitor) Query(cmd *Command, cb qmpMonitorCallBack)
func (*QmpMonitor) QueryMachines ¶
func (m *QmpMonitor) QueryMachines(callback QueryMachinesCallback)
func (*QmpMonitor) QueryPci ¶
func (m *QmpMonitor) QueryPci(callback QueryPciCallback)
func (*QmpMonitor) QueryStatus ¶
func (m *QmpMonitor) QueryStatus(callback StringCallback)
func (*QmpMonitor) Quit ¶
func (m *QmpMonitor) Quit(callback StringCallback)
func (*QmpMonitor) ReloadDiskBlkdev ¶
func (m *QmpMonitor) ReloadDiskBlkdev(device, path string, callback StringCallback)
func (*QmpMonitor) ResizeDisk ¶
func (m *QmpMonitor) ResizeDisk(driveName string, sizeMB int64, callback StringCallback)
func (*QmpMonitor) SaveState ¶
func (m *QmpMonitor) SaveState(stateFilePath string, callback StringCallback)
func (*QmpMonitor) SetVncPassword ¶
func (m *QmpMonitor) SetVncPassword(proto, password string, callback StringCallback)
func (*QmpMonitor) SimpleCommand ¶
func (m *QmpMonitor) SimpleCommand(cmd string, callback StringCallback)
func (*QmpMonitor) SnapshotBlkdev ¶
func (m *QmpMonitor) SnapshotBlkdev(drive, newImagePath, format string, reuse bool, callback StringCallback)
func (*QmpMonitor) StartNbdServer ¶
func (m *QmpMonitor) StartNbdServer(port int, exportAllDevice, writable bool, callback StringCallback)
func (*QmpMonitor) StopNbdServer ¶
func (m *QmpMonitor) StopNbdServer(callback StringCallback)
func (*QmpMonitor) XBlockdevChange ¶
func (m *QmpMonitor) XBlockdevChange(parent, node, child string, callback StringCallback)
type QueryMachinesCallback ¶
type QueryMachinesCallback func(machineInfoList []MachineInfo, err string)
type QueryMemoryDevicesCallback ¶
type QueryMemoryDevicesCallback func(memoryDevicesInfoList []MemoryDeviceInfo, err string)
type QueryPciCallback ¶
type SBaseMonitor ¶
type SBaseMonitor struct { OnMonitorDisConnect MonitorErrorFunc OnMonitorConnected MonitorSuccFunc OnMonitorTimeout MonitorErrorFunc QemuVersion string // contains filtered or unexported fields }
func NewBaseMonitor ¶
func NewBaseMonitor(server, sid string, OnMonitorConnected MonitorSuccFunc, OnMonitorDisConnect, OnMonitorTimeout MonitorErrorFunc) *SBaseMonitor
func (*SBaseMonitor) ConnectWithSocket ¶
func (m *SBaseMonitor) ConnectWithSocket(address string) error
func (*SBaseMonitor) Disconnect ¶
func (m *SBaseMonitor) Disconnect()
func (*SBaseMonitor) IsConnected ¶
func (m *SBaseMonitor) IsConnected() bool
func (*SBaseMonitor) QemuMonitorCommand ¶
func (m *SBaseMonitor) QemuMonitorCommand(cmd string, callback StringCallback) error
func (*SBaseMonitor) SetReadDeadlineTimeout ¶
func (m *SBaseMonitor) SetReadDeadlineTimeout(duration time.Duration)
type StringCallback ¶
type StringCallback func(string)
type Version ¶
type XbzrleCacheStats ¶
type XbzrleCacheStats struct { CacheSize int64 `json:"cache-size"` Bytes int64 `json:"bytes"` Pages int64 `json:"pages"` CacheMiss int64 `json:"cache-miss"` CacheMissRate float64 `json:"cache-miss-rate"` Overflow int64 `json:"overflow"` }
XbzrleCacheStats implements the "XBZRLECacheStats" QMP API type.