lxd: github.com/lxc/lxd/lxd/instance/drivers/qmp Index | Files

package qmp

import "github.com/lxc/lxd/lxd/instance/drivers/qmp"

Index

Package Files

errors.go monitor.go

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

type Monitor Uses

type Monitor struct {
    // contains filtered or unexported fields
}

Monitor represents a QMP monitor.

func Connect Uses

func Connect(path 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 Uses

func (m *Monitor) AgentReady() bool

AgentReady indicates whether an agent has been detected.

func (*Monitor) Console Uses

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

Console fetches the File for a particular console.

func (*Monitor) Disconnect Uses

func (m *Monitor) Disconnect()

Disconnect forces a disconnection from QEMU.

func (*Monitor) GetCPUs Uses

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

GetCPUs fetches the vCPU information for pinning.

func (*Monitor) Pause Uses

func (m *Monitor) Pause() error

Pause tells QEMU to temporarily stop the emulation.

func (*Monitor) Powerdown Uses

func (m *Monitor) Powerdown() error

Powerdown tells the VM to gracefully shutdown.

func (*Monitor) Quit Uses

func (m *Monitor) Quit() error

Quit tells QEMU to exit immediately.

func (*Monitor) Start Uses

func (m *Monitor) Start() error

Start tells QEMU to start the emulation.

func (*Monitor) Status Uses

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

Status returns the current VM status.

func (*Monitor) Wait Uses

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

Wait returns a channel that will be closed on disconnection.

Package qmp imports 8 packages (graph) and is imported by 2 packages. Updated 2020-02-22. Refresh now. Tools for package owners.