Documentation
¶
Index ¶
- Variables
- type Monitor
- func (m *Monitor) AgentReady() bool
- func (m *Monitor) Console(target string) (*os.File, error)
- func (m *Monitor) Disconnect()
- func (m *Monitor) GetCPUs() ([]int, error)
- func (m *Monitor) GetMemoryBalloonSizeBytes() (int64, error)
- func (m *Monitor) GetMemorySizeBytes() (int64, error)
- func (m *Monitor) Migrate(uri string) error
- func (m *Monitor) MigrateIncoming(uri string) error
- func (m *Monitor) Pause() error
- func (m *Monitor) Powerdown() error
- func (m *Monitor) Quit() error
- func (m *Monitor) SendFile(name string, file *os.File) error
- func (m *Monitor) SetMemoryBalloonSizeBytes(sizeBytes int64) error
- func (m *Monitor) Start() error
- func (m *Monitor) Status() (string, error)
- func (m *Monitor) Wait() (chan struct{}, error)
Constants ¶
This section is empty.
Variables ¶
var ErrMonitorBadConsole = fmt.Errorf("Requested console couldn't be found")
ErrMonitorBadConsole is retuned when the requested console doesn't exist.
var ErrMonitorBadReturn = fmt.Errorf("Monitor returned invalid data")
ErrMonitorBadReturn is returned when the QMP data cannot be deserialized.
var ErrMonitorDisconnect = fmt.Errorf("Monitor is disconnected")
ErrMonitorDisconnect is returned when interacting with a disconnected Monitor.
var RingbufSize = 16
RingbufSize is the size of the agent serial ringbuffer in bytes
Functions ¶
This section is empty.
Types ¶
type Monitor ¶
type Monitor struct {
// contains filtered or unexported fields
}
Monitor represents a QMP monitor.
func Connect ¶
func Connect(path string, serialCharDev string, eventHandler func(name string, data map[string]interface{})) (*Monitor, error)
Connect creates or retrieves an existing QMP monitor for the path.
func (*Monitor) AgentReady ¶
AgentReady indicates whether an agent has been detected.
func (*Monitor) Disconnect ¶
func (m *Monitor) Disconnect()
Disconnect forces a disconnection from QEMU.
func (*Monitor) GetMemoryBalloonSizeBytes ¶
GetMemoryBalloonSizeBytes returns effective size of the memory in bytes (considering the current balloon size).
func (*Monitor) GetMemorySizeBytes ¶
GetMemorySizeBytes returns the current size of the base memory in bytes.
func (*Monitor) MigrateIncoming ¶
MigrateIncoming starts the receiver of a migration stream.
func (*Monitor) SetMemoryBalloonSizeBytes ¶
SetMemoryBalloonSizeBytes sets the size of the memory in bytes (which will resize the balloon as needed).