diff options
Diffstat (limited to 'src/zenserver/hub')
| -rw-r--r-- | src/zenserver/hub/httphubservice.cpp | 1 | ||||
| -rw-r--r-- | src/zenserver/hub/hub.cpp | 2 | ||||
| -rw-r--r-- | src/zenserver/hub/hub.h | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/src/zenserver/hub/httphubservice.cpp b/src/zenserver/hub/httphubservice.cpp index 03be6e85d..a91e36128 100644 --- a/src/zenserver/hub/httphubservice.cpp +++ b/src/zenserver/hub/httphubservice.cpp @@ -42,6 +42,7 @@ HttpHubService::HttpHubService(Hub& Hub) : m_Hub(Hub) { Obj << "moduleId" << ModuleId; Obj << "state" << ToString(Info.State); + Obj << "port" << Info.Port; Obj.BeginObject("process_metrics"); { Obj << "MemoryBytes" << Info.Metrics.MemoryBytes; diff --git a/src/zenserver/hub/hub.cpp b/src/zenserver/hub/hub.cpp index 54f45e511..ebbb9432a 100644 --- a/src/zenserver/hub/hub.cpp +++ b/src/zenserver/hub/hub.cpp @@ -605,6 +605,7 @@ Hub::Find(std::string_view ModuleId, InstanceInfo* OutInstanceInfo) std::chrono::system_clock::now() // TODO }; Instance->GetProcessMetrics(Info.Metrics); + Info.Port = Instance->GetBasePort(); *OutInstanceInfo = Info; } @@ -628,6 +629,7 @@ Hub::EnumerateModules(std::function<void(std::string_view ModuleId, const Instan std::chrono::system_clock::now() // TODO }; Instance->GetProcessMetrics(Info.Metrics); + Info.Port = Instance->GetBasePort(); Infos.push_back(std::make_pair(std::string(Instance->GetModuleId()), Info)); } diff --git a/src/zenserver/hub/hub.h b/src/zenserver/hub/hub.h index 9a84f7744..8c4039c38 100644 --- a/src/zenserver/hub/hub.h +++ b/src/zenserver/hub/hub.h @@ -69,6 +69,7 @@ public: HubInstanceState State = HubInstanceState::Unprovisioned; std::chrono::system_clock::time_point ProvisionTime; ProcessMetrics Metrics; + uint16_t Port = 0; }; /** |