MCPcopy Create free account
hub / github.com/78/tenbox / VmStateFromString

Function VmStateFromString

src/daemon/daemon_types.cpp:28–35  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

26}
27
28VmState VmStateFromString(const std::string& value) {
29 if (value == "starting") return VmState::kStarting;
30 if (value == "running") return VmState::kRunning;
31 if (value == "stopping") return VmState::kStopping;
32 if (value == "crashed") return VmState::kCrashed;
33 if (value == "rebooting") return VmState::kRebooting;
34 return VmState::kStopped;
35}
36
37nlohmann::json ToJson(const HostForward& forward) {
38 return {

Callers 2

HandleRuntimeMessageMethod · 0.85
ReadRuntimeStateFileFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected