Documentation ¶
Overview ¶
Package qmpcmd defines a subset of possible QMP commands that are used by machina.
Index ¶
Constants ¶
const Quit = Action("quit")
Quit is a QMP command that requests immediate and ungraceful termination of a virtual machine.
const SystemPowerdown = Action("system_powerdown")
SystemPowerdown is a QMP command that issues a graceful shutdown request to a virtual machine.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action string
Action is a QMP command with no arguments and no expected response.
func (Action) CommandArgs ¶
CommandArgs returns a nil JSON byte slice.
func (Action) CommandResponse ¶
CommandResponse unmarshals a JSON-encoded response to a QMP command.
No response is expected for actions, so this function does nothing.
type Capabilities ¶
type Capabilities struct { // Enable holds the set of QMP capabilities requested by a client. Enable []string `json:"enable,omitempty"` }
Capabilities is a QMP command that declares QMP capabilities requested by the client.
func (Capabilities) Command ¶
func (caps Capabilities) Command() string
Command returns the command name "qmp_capabilities".
func (Capabilities) CommandArgs ¶
func (caps Capabilities) CommandArgs() ([]byte, error)
CommandArgs returns the QMP capabilities command arguments marshaled as a JSON byte slice.
func (Capabilities) CommandResponse ¶
func (caps Capabilities) CommandResponse([]byte) error
CommandResponse unmarshals a JSON-encoded response to a QMP capabilities command.
No response is expected, so this function does nothing.
type QueryCPU ¶
type QueryCPU struct {
Response string
}
QueryCPU is a QMP command that returns information about the CPU in a virtual machine.
func (QueryCPU) CommandArgs ¶
CommandArgs returns a nil JSON byte slice.
func (*QueryCPU) CommandResponse ¶
CommandResponse unmarshals the JSON-encoded response to a QMP command.
type QueryPCI ¶
type QueryPCI struct {
Response string
}
QueryCPU is a QMP command that returns information about the PCI bus in a virtual machine.
func (QueryPCI) CommandArgs ¶
CommandArgs returns a nil JSON byte slice.
func (*QueryPCI) CommandResponse ¶
CommandResponse unmarshals the JSON-encoded response to a QMP command.