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) Pause() error
- func (m *Monitor) Powerdown() error
- func (m *Monitor) Quit() 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 ¶
View Source
var ErrMonitorBadConsole = fmt.Errorf("Requested console couldn't be found")
ErrMonitorBadConsole is retuned when the requested console doesn't exist.
View Source
var ErrMonitorBadReturn = fmt.Errorf("Monitor returned invalid data")
ErrMonitorBadReturn is returned when the QMP data cannot be deserialized.
View Source
var ErrMonitorDisconnect = fmt.Errorf("Monitor is disconnected")
ErrMonitorDisconnect is returned when interacting with a disconnected Monitor.
View Source
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.
Click to show internal directories.
Click to hide internal directories.