Documentation ¶
Index ¶
- Constants
- type CapabilitiesRequest
- type CapabilitiesRequestArguments
- type CapabilitiesResponse
- type Capability
- type ContRequest
- type ContResponse
- type ErrorResponse
- type EventType
- type Greeting
- type GreetingRequest
- type GreetingResponse
- type GreetingVersion
- type GreetingVersionTriple
- type KvmInfo
- type QEMUMachineProtocolClient
- func (c *QEMUMachineProtocolClient) Capabilities(req CapabilitiesRequest) (*CapabilitiesResponse, error)
- func (c *QEMUMachineProtocolClient) Close() error
- func (c *QEMUMachineProtocolClient) Cont(req ContRequest) (*any, error)
- func (c *QEMUMachineProtocolClient) Greeting() (*GreetingResponse, error)
- func (c *QEMUMachineProtocolClient) QueryKvm(req QueryKvmRequest) (*QueryKvmResponse, error)
- func (c *QEMUMachineProtocolClient) QueryStatus(req QueryStatusRequest) (*QueryStatusResponse, error)
- func (c *QEMUMachineProtocolClient) Quit(req QuitRequest) (*QuitResponse, error)
- func (c *QEMUMachineProtocolClient) Stop(req StopRequest) (*any, error)
- func (c *QEMUMachineProtocolClient) SystemPowerdown(req SystemPowerdownRequest) (*any, error)
- func (c *QEMUMachineProtocolClient) SystemReset(req SystemResetRequest) (*any, error)
- func (c *QEMUMachineProtocolClient) SystemWakeup(req SystemWakeupRequest) (*any, error)
- type QueryKvmRequest
- type QueryKvmResponse
- type QueryStatusRequest
- type QueryStatusResponse
- type QuitRequest
- type QuitResponse
- type RunState
- type ShutdownCause
- type StatusInfo
- type StopRequest
- type StopResponse
- type SystemPowerdownRequest
- type SystemResetRequest
- type SystemWakeupRequest
Constants ¶
View Source
const ( EVENT_ACPI_DEVICE_OST = EventType("ACPI_DEVICE_OST") EVENT_BALLOON_CHANGE = EventType("BALLOON_CHANGE") EVENT_BLOCK_IMAGE_CORRUPTED = EventType("BLOCK_IMAGE_CORRUPTED") EVENT_BLOCK_IO_ERROR = EventType("BLOCK_IO_ERROR") EVENT_BLOCK_JOB_CANCELLED = EventType("BLOCK_JOB_CANCELLED") EVENT_BLOCK_JOB_COMPLETED = EventType("BLOCK_JOB_COMPLETED") EVENT_BLOCK_JOB_ERROR = EventType("BLOCK_JOB_ERROR") EVENT_BLOCK_JOB_PENDING = EventType("BLOCK_JOB_PENDING") EVENT_BLOCK_JOB_READY = EventType("BLOCK_JOB_READY") EVENT_DEVICE_DELETED = EventType("DEVICE_DELETED") EVENT_DEVICE_TRAY_MOVED = EventType("DEVICE_TRAY_MOVED") EVENT_DEVICE_UNPLUG_GUEST_ERROR = EventType("DEVICE_UNPLUG_GUEST_ERROR") EVENT_DUMP_COMPLETED = EventType("DUMP_COMPLETED") EVENT_FAILOVER_NEGOTIATED = EventType("FAILOVER_NEGOTIATED") EVENT_GUEST_CRASHLOADED = EventType("GUEST_CRASHLOADED") EVENT_GUEST_PANICKED = EventType("GUEST_PANICKED") EVENT_MEM_UNPLUG_ERRO = EventType("MEM_UNPLUG_ERRO") EVENT_MEMORY_DEVICE_SIZE_CHANGE = EventType("MEMORY_DEVICE_SIZE_CHANGE") EVENT_MEMORY_FAILURE = EventType("MEMORY_FAILURE") EVENT_NIC_RX_FILTER_CHANGED = EventType("NIC_RX_FILTER_CHANGED") EVENT_POWERDOWN = EventType("POWERDOWN") EVENT_PR_MANAGER_STATUS_CHANGED = EventType("PR_MANAGER_STATUS_CHANGED") EVENT_QUORUM_FAILURE = EventType("QUORUM_FAILURE") EVENT_RESET = EventType("RESET") EVENT_RESUME = EventType("RESUME") EVENT_SHUTDOWN = EventType("SHUTDOWN") EVENT_STOP = EventType("STOP") EVENT_SUSPEND = EventType("SUSPEND") EVENT_UNPLUG_PRIMARY = EventType("UNPLUG_PRIMARY") EVENT_VFU_CLIENT_HANGUP = EventType("VFU_CLIENT_HANGUP") EVENT_VNC_CONNECTED = EventType("VNC_CONNECTED") EVENT_VNC_DISCONNECTED = EventType("VNC_DISCONNECTED") EVENT_VSERPORT_CHANGE = EventType("VSERPORT_CHANGE") EVENT_WAKEUP = EventType("WAKEUP") EVENT_WATCHDOG = EventType("WATCHDOG") )
View Source
const ( SHUTDOWN_NONE = ShutdownCause("none") SHUTDOWN_HOST_ERROR = ShutdownCause("host-error") SHUTDOWN_HOST_QMP_QUIT = ShutdownCause("host-qmp-quit") SHUTDOWN_HOST_QMP_SYSTEM_RESET = ShutdownCause("host-qmp-system-reset") SHUTDOWN_HOST_SIGNAL = ShutdownCause("host-signal") SHUTDOWN_HOST_UI = ShutdownCause("host-ui") SHUTDOWN_GUEST_SHUTDOWN = ShutdownCause("guest-shutdown") SHUTDOWN_GUEST_RESET = ShutdownCause("guest-reset") SHUTDOWN_GUEST_PANIC = ShutdownCause("guest-panic") SHUTDOWN_SUBSYSTEM_RESET = ShutdownCause("subsystem-reset") )
View Source
const ( RUN_STATE_COLO = RunState("colo") RUN_STATE_DEBUG = RunState("debug") RUN_STATE_FINISH_MIGRATE = RunState("finish-migrate") RUN_STATE_GUEST_PANICKED = RunState("guest-panicked") RUN_STATE_INMIGRATE = RunState("inmigrate") RUN_STATE_INTERNAL_ERROR = RunState("internal-error") RUN_STATE_IO_ERROR = RunState("io-error") RUN_STATE_PAUSED = RunState("paused") RUN_STATE_POSTMIGRATE = RunState("postmigrate") RUN_STATE_PRELAUNCH = RunState("prelaunch") RUN_STATE_RESTORE_VM = RunState("restore-vm") RUN_STATE_RUNNING = RunState("running") RUN_STATE_SAVE_VM = RunState("save-vm") RUN_STATE_SHUTDOWN = RunState("shutdown") RUN_STATE_SUSPENDED = RunState("suspended") RUN_STATE_WATCHDOG = RunState("watchdog") )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CapabilitiesRequest ¶
type CapabilitiesRequest struct { Execute string `json:"execute" default:"qmp_capabilities"` Arguments CapabilitiesRequestArguments `json:"arguments,omitempty"` }
type CapabilitiesRequestArguments ¶
type CapabilitiesRequestArguments struct {
Enable []Capability `json:"enable"`
}
type CapabilitiesResponse ¶
type CapabilitiesResponse struct { }
type Capability ¶
type Capability string
func Capabilitys ¶
func Capabilitys() []Capability
func (Capability) String ¶
func (e Capability) String() string
type ContRequest ¶
type ContRequest struct {
Execute string `json:"execute" default:"cont"`
}
type ContResponse ¶
type ContResponse struct { }
type ErrorResponse ¶
type Greeting ¶
type Greeting struct { Version GreetingVersion `json:"version"` Capabilities []Capability `json:"capabilities"` }
type GreetingRequest ¶
type GreetingRequest struct { }
type GreetingResponse ¶
type GreetingResponse struct {
Qmp Greeting `json:"QMP"`
}
type GreetingVersion ¶
type GreetingVersion struct { Qemu GreetingVersionTriple `json:"qemu"` Package string `json:"package"` }
type GreetingVersionTriple ¶
type QEMUMachineProtocolClient ¶
type QEMUMachineProtocolClient struct {
// contains filtered or unexported fields
}
func NewQEMUMachineProtocolClient ¶
func NewQEMUMachineProtocolClient(conn io.ReadWriteCloser) *QEMUMachineProtocolClient
func (*QEMUMachineProtocolClient) Capabilities ¶
func (c *QEMUMachineProtocolClient) Capabilities(req CapabilitiesRequest) (*CapabilitiesResponse, error)
func (*QEMUMachineProtocolClient) Close ¶
func (c *QEMUMachineProtocolClient) Close() error
func (*QEMUMachineProtocolClient) Cont ¶
func (c *QEMUMachineProtocolClient) Cont(req ContRequest) (*any, error)
func (*QEMUMachineProtocolClient) Greeting ¶
func (c *QEMUMachineProtocolClient) Greeting() (*GreetingResponse, error)
func (*QEMUMachineProtocolClient) QueryKvm ¶
func (c *QEMUMachineProtocolClient) QueryKvm(req QueryKvmRequest) (*QueryKvmResponse, error)
func (*QEMUMachineProtocolClient) QueryStatus ¶
func (c *QEMUMachineProtocolClient) QueryStatus(req QueryStatusRequest) (*QueryStatusResponse, error)
func (*QEMUMachineProtocolClient) Quit ¶
func (c *QEMUMachineProtocolClient) Quit(req QuitRequest) (*QuitResponse, error)
func (*QEMUMachineProtocolClient) Stop ¶
func (c *QEMUMachineProtocolClient) Stop(req StopRequest) (*any, error)
func (*QEMUMachineProtocolClient) SystemPowerdown ¶
func (c *QEMUMachineProtocolClient) SystemPowerdown(req SystemPowerdownRequest) (*any, error)
func (*QEMUMachineProtocolClient) SystemReset ¶
func (c *QEMUMachineProtocolClient) SystemReset(req SystemResetRequest) (*any, error)
func (*QEMUMachineProtocolClient) SystemWakeup ¶
func (c *QEMUMachineProtocolClient) SystemWakeup(req SystemWakeupRequest) (*any, error)
type QueryKvmRequest ¶
type QueryKvmRequest struct {
Execute string `json:"execute" default:"query-kvm"`
}
type QueryKvmResponse ¶
type QueryKvmResponse struct {
Return KvmInfo `json:"return"`
}
type QueryStatusRequest ¶
type QueryStatusRequest struct {
Execute string `json:"execute" default:"query-status"`
}
type QueryStatusResponse ¶
type QueryStatusResponse struct {
Return StatusInfo `json:"return"`
}
type QuitRequest ¶
type QuitRequest struct {
Execute string `json:"execute" default:"quit"`
}
type QuitResponse ¶
type QuitResponse struct { }
type ShutdownCause ¶
type ShutdownCause string
func ShutdownCauses ¶
func ShutdownCauses() []ShutdownCause
func (ShutdownCause) String ¶
func (e ShutdownCause) String() string
type StatusInfo ¶
type StopRequest ¶
type StopRequest struct {
Execute string `json:"execute" default:"stop"`
}
type StopResponse ¶
type StopResponse struct { }
type SystemPowerdownRequest ¶
type SystemPowerdownRequest struct {
Execute string `json:"execute" default:"system_powerdown"`
}
type SystemResetRequest ¶
type SystemResetRequest struct {
Execute string `json:"execute" default:"system_reset"`
}
type SystemWakeupRequest ¶
type SystemWakeupRequest struct {
Execute string `json:"execute" default:"system_Wakeup"`
}
Click to show internal directories.
Click to hide internal directories.