-
Notifications
You must be signed in to change notification settings - Fork 63
/
run_state.pb.netconn.go
98 lines (86 loc) · 2.76 KB
/
run_state.pb.netconn.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
// Code generated by kraftkit.sh/tools/protoc-gen-go-netconn. DO NOT EDIT.
// source: machine/qemu/qmp/v7alpha2/run_state.proto
package qmpv7alpha2
type ShutdownCause string
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")
)
func (e ShutdownCause) String() string {
return string(e)
}
func ShutdownCauses() []ShutdownCause {
return []ShutdownCause{
SHUTDOWN_NONE,
SHUTDOWN_HOST_ERROR,
SHUTDOWN_HOST_QMP_QUIT,
SHUTDOWN_HOST_QMP_SYSTEM_RESET,
SHUTDOWN_HOST_SIGNAL,
SHUTDOWN_HOST_UI,
SHUTDOWN_GUEST_SHUTDOWN,
SHUTDOWN_GUEST_RESET,
SHUTDOWN_GUEST_PANIC,
SHUTDOWN_SUBSYSTEM_RESET,
}
}
type RunState string
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")
)
func (e RunState) String() string {
return string(e)
}
func RunStates() []RunState {
return []RunState{
RUN_STATE_COLO,
RUN_STATE_DEBUG,
RUN_STATE_FINISH_MIGRATE,
RUN_STATE_GUEST_PANICKED,
RUN_STATE_INMIGRATE,
RUN_STATE_INTERNAL_ERROR,
RUN_STATE_IO_ERROR,
RUN_STATE_PAUSED,
RUN_STATE_POSTMIGRATE,
RUN_STATE_PRELAUNCH,
RUN_STATE_RESTORE_VM,
RUN_STATE_RUNNING,
RUN_STATE_SAVE_VM,
RUN_STATE_SHUTDOWN,
RUN_STATE_SUSPENDED,
RUN_STATE_WATCHDOG,
}
}
type QueryStatusRequest struct {
Execute string `json:"execute" default:"query-status"`
}
type StatusInfo struct {
Running bool `json:"running"`
SingleStep bool `json:"singlestep"`
Status RunState `json:"status"`
}
type QueryStatusResponse struct {
Return StatusInfo `json:"return"`
}