qmp

package
v0.0.0-...-b84de06 Latest Latest
Warning

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

Go to latest
Published: Aug 9, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

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

func (m *Monitor) AgentReady() bool

AgentReady indicates whether an agent has been detected.

func (*Monitor) Console

func (m *Monitor) Console(target string) (*os.File, error)

Console fetches the File for a particular console.

func (*Monitor) Disconnect

func (m *Monitor) Disconnect()

Disconnect forces a disconnection from QEMU.

func (*Monitor) GetCPUs

func (m *Monitor) GetCPUs() ([]int, error)

GetCPUs fetches the vCPU information for pinning.

func (*Monitor) Pause

func (m *Monitor) Pause() error

Pause tells QEMU to temporarily stop the emulation.

func (*Monitor) Powerdown

func (m *Monitor) Powerdown() error

Powerdown tells the VM to gracefully shutdown.

func (*Monitor) Quit

func (m *Monitor) Quit() error

Quit tells QEMU to exit immediately.

func (*Monitor) Start

func (m *Monitor) Start() error

Start tells QEMU to start the emulation.

func (*Monitor) Status

func (m *Monitor) Status() (string, error)

Status returns the current VM status.

func (*Monitor) Wait

func (m *Monitor) Wait() (chan struct{}, error)

Wait returns a channel that will be closed on disconnection.

Jump to

Keyboard shortcuts

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