diff options
Diffstat (limited to 'zenserver/projectstore/projectstore.h')
| -rw-r--r-- | zenserver/projectstore/projectstore.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/zenserver/projectstore/projectstore.h b/zenserver/projectstore/projectstore.h index 928a74f59..e4f664b85 100644 --- a/zenserver/projectstore/projectstore.h +++ b/zenserver/projectstore/projectstore.h @@ -7,6 +7,8 @@ #include <zenhttp/httpserver.h> #include <zenstore/gc.h> +#include "monitoring/httpstats.h" + ZEN_THIRD_PARTY_INCLUDES_START #include <tsl/robin_map.h> ZEN_THIRD_PARTY_INCLUDES_END @@ -80,8 +82,10 @@ public: void IterateFileMap(std::function<void(const Oid&, const std::string_view& ServerPath, const std::string_view& ClientPath)>&& Fn); void IterateOplog(std::function<void(CbObject)>&& Fn); + void IterateOplogWithKey(std::function<void(int, const Oid&, CbObject)>&& Fn); std::optional<CbObject> GetOpByKey(const Oid& Key); std::optional<CbObject> GetOpByIndex(int Index); + int GetOpIndexByKey(const Oid& Key); IoBuffer FindChunk(Oid ChunkId); @@ -341,15 +345,17 @@ private: // refs: // -class HttpProjectService : public HttpService +class HttpProjectService : public HttpService, public IHttpStatsProvider { public: - HttpProjectService(CidStore& Store, ProjectStore* InProjectStore, AuthMgr& AuthMgr); + HttpProjectService(CidStore& Store, ProjectStore* InProjectStore, HttpStatsService& StatsService, AuthMgr& AuthMgr); ~HttpProjectService(); virtual const char* BaseUri() const override; virtual void HandleRequest(HttpServerRequest& Request) override; + virtual void HandleStatsRequest(HttpServerRequest& Request) override; + private: inline spdlog::logger& Log() { return m_Log; } @@ -357,6 +363,7 @@ private: CidStore& m_CidStore; HttpRequestRouter m_Router; Ref<ProjectStore> m_ProjectStore; + HttpStatsService& m_StatsService; AuthMgr& m_AuthMgr; }; |