monitor

package
v0.3.9-9 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2023 License: Apache-2.0 Imports: 19 Imported by: 5

Documentation

Index

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
	// contains filtered or unexported fields
}

func (*BlockJob) PreOffset

func (self *BlockJob) PreOffset(preOffset int64)

type Command

type Command struct {
	Execute string      `json:"execute"`
	Args    interface{} `json:"arguments,omitempty"`
}

type Error

type Error struct {
	Class string `json:"class"`
	Desc  string `json:"desc"`
}

func (*Error) Error

func (e *Error) Error() string

type Event

type Event struct {
	Event     string                 `json:"event"`
	Data      map[string]interface{} `json:"data"`
	Timestamp *Timestamp             `json:"timestamp"`
}

func (*Event) String

func (e *Event) String() string

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, _, _ int, 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) Connect

func (m *HmpMonitor) Connect(host string, port int) error

func (*HmpMonitor) ConnectWithSocket

func (m *HmpMonitor) ConnectWithSocket(address string) error

func (*HmpMonitor) DeviceAdd

func (m *HmpMonitor) DeviceAdd(dev string, params map[string]interface{}, 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)

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

func (m *HmpMonitor) GetMemdevList(callback MemdevListCallback)

func (*HmpMonitor) GetMigrateStats

func (m *HmpMonitor) GetMigrateStats(callback MigrateStatsCallback)

func (*HmpMonitor) GetMigrateStatus

func (m *HmpMonitor) GetMigrateStatus(callback StringCallback)

func (*HmpMonitor) GetScsiNumQueues

func (m *HmpMonitor) GetScsiNumQueues(callback func(int64))

func (*HmpMonitor) GetVersion

func (m *HmpMonitor) GetVersion(callback StringCallback)

func (*HmpMonitor) HumanMonitorCommand

func (m *HmpMonitor) HumanMonitorCommand(cmd string, callback StringCallback)

func (*HmpMonitor) Migrate

func (m *HmpMonitor) Migrate(
	destStr string, copyIncremental, copyFull bool, 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) QueryPci

func (m *HmpMonitor) QueryPci(callback QueryPciCallback)

func (*HmpMonitor) QueryStatus

func (m *HmpMonitor) QueryStatus(callback 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) XBlockdevChange

func (m *HmpMonitor) XBlockdevChange(parent, node, child string, callback StringCallback)

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 MemdevListCallback func(res []Memdev, err string)

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

	GetCpuCount(func(count int))
	AddCpu(cpuIndex int, callback StringCallback)
	GeMemtSlotIndex(func(index int))
	GetMemdevList(MemdevListCallback)
	GetScsiNumQueues(func(int64))
	QueryPci(callback QueryPciCallback)

	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]interface{}, callback StringCallback)

	XBlockdevChange(parent, node, child string, callback StringCallback)
	BlockStream(drive string, idx, blkCnt int, callback StringCallback)
	DriveMirror(callback StringCallback, drive, target, syncMode, format string, unmap, blockReplication bool)
	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)
	GetMigrateStatus(callback StringCallback)
	MigrateStartPostcopy(callback StringCallback)
	GetMigrateStats(callback MigrateStatsCallback)

	ReloadDiskBlkdev(device, path string, callback StringCallback)
	SetVncPassword(proto, password string, callback StringCallback)
	StartNbdServer(port int, exportAllDevice, writable bool, 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)
}

type MonitorErrorFunc

type MonitorErrorFunc func(error)

type MonitorSuccFunc

type MonitorSuccFunc func()

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

type PCIDeviceClass struct {
	Desc  *string `json:"desc,omitempty"`
	Class int64   `json:"class"`
}

PCIDeviceClass implements the "PciDeviceClass" QMP API type.

type PCIDeviceID

type PCIDeviceID struct {
	Device int64 `json:"device"`
	Vendor int64 `json:"vendor"`
}

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

type PCIMemoryRange struct {
	Base  int64 `json:"base"`
	Limit int64 `json:"limit"`
}

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 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, idx, blkCnt int, 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) Connect

func (m *QmpMonitor) Connect(host string, port int) error

func (*QmpMonitor) ConnectWithSocket

func (m *QmpMonitor) ConnectWithSocket(address string) error

func (*QmpMonitor) DeviceAdd

func (m *QmpMonitor) DeviceAdd(dev string, params map[string]interface{}, 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)

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

func (m *QmpMonitor) GetMemdevList(callback MemdevListCallback)

func (*QmpMonitor) GetMigrateStats

func (m *QmpMonitor) GetMigrateStats(callback MigrateStatsCallback)

func (*QmpMonitor) GetMigrateStatus

func (m *QmpMonitor) GetMigrateStatus(callback StringCallback)

func (*QmpMonitor) GetScsiNumQueues

func (m *QmpMonitor) GetScsiNumQueues(callback func(int64))

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

func (m *QmpMonitor) Migrate(
	destStr string, copyIncremental, copyFull bool, 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) QueryPci

func (m *QmpMonitor) QueryPci(callback QueryPciCallback)

func (*QmpMonitor) QueryStatus

func (m *QmpMonitor) QueryStatus(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) XBlockdevChange

func (m *QmpMonitor) XBlockdevChange(parent, node, child string, callback StringCallback)

type QueryPciCallback

type QueryPciCallback func(pciInfoList []PCIInfo, err string)

type Response

type Response struct {
	Return   []byte
	ErrorVal *Error
	Id       string
}

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

func (m *SBaseMonitor) Connect(host string, port int) error

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

type StringCallback

type StringCallback func(string)

type Timestamp

type Timestamp struct {
	Seconds       int64 `json:"seconds"`
	Microsenconds int64 `json:"microsenconds"`
}

type Version

type Version struct {
	Package string `json:"package"`
	QEMU    struct {
		Major int `json:"major"`
		Micro int `json:"micro"`
		Minor int `json:"minor"`
	} `json:"qemu"`
}

func (*Version) String

func (v *Version) String() string

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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