diff options
| author | Stefan Boberg <[email protected]> | 2022-05-20 12:42:56 +0200 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2022-05-20 12:42:56 +0200 |
| commit | 5b271be0169b842cdc3d576e48bf0ddc2f122852 (patch) | |
| tree | 16f501d2190f19a7281ce3f30365817464e146cb /zenserver/upstream/upstreamapply.cpp | |
| parent | Added ZEN_USE_CATCH2 define (diff) | |
| parent | fix mac compilation error (diff) | |
| download | zen-5b271be0169b842cdc3d576e48bf0ddc2f122852.tar.xz zen-5b271be0169b842cdc3d576e48bf0ddc2f122852.zip | |
Merge branch 'main' into use-catch2
Diffstat (limited to 'zenserver/upstream/upstreamapply.cpp')
| -rw-r--r-- | zenserver/upstream/upstreamapply.cpp | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/zenserver/upstream/upstreamapply.cpp b/zenserver/upstream/upstreamapply.cpp index 9758e7565..c397bb141 100644 --- a/zenserver/upstream/upstreamapply.cpp +++ b/zenserver/upstream/upstreamapply.cpp @@ -119,6 +119,22 @@ public: return m_RunState.IsRunning; } + virtual bool IsHealthy() const override + { + if (m_RunState.IsRunning) + { + for (const auto& Endpoint : m_Endpoints) + { + if (Endpoint->IsHealthy()) + { + return true; + } + } + } + + return false; + } + virtual void RegisterEndpoint(std::unique_ptr<UpstreamApplyEndpoint> Endpoint) override { m_Endpoints.emplace_back(std::move(Endpoint)); @@ -429,6 +445,12 @@ private: ////////////////////////////////////////////////////////////////////////// +bool +UpstreamApply::IsHealthy() const +{ + return false; +} + std::unique_ptr<UpstreamApply> UpstreamApply::Create(const UpstreamApplyOptions& Options, CasStore& CasStore, CidStore& CidStore) { |