diff options
| author | Stefan Boberg <[email protected]> | 2025-10-14 11:32:16 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2025-10-14 11:32:16 +0200 |
| commit | ca09abbeef5b1788f4a52b61eedd2f3dd07f81f2 (patch) | |
| tree | 005a50adfddf6982bab3a06bb93d4c50da1a11fd /src/zenserver/storage/admin/admin.h | |
| parent | make asiohttp work without IPv6 (#562) (diff) | |
| download | zen-ca09abbeef5b1788f4a52b61eedd2f3dd07f81f2.tar.xz zen-ca09abbeef5b1788f4a52b61eedd2f3dd07f81f2.zip | |
move all storage-related services into storage tree (#571)
* move all storage-related services into storage tree
* move config into config/
* also move admin service into storage since it mostly has storage related functionality
* header consolidation
Diffstat (limited to 'src/zenserver/storage/admin/admin.h')
| -rw-r--r-- | src/zenserver/storage/admin/admin.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/src/zenserver/storage/admin/admin.h b/src/zenserver/storage/admin/admin.h new file mode 100644 index 000000000..9a49f5120 --- /dev/null +++ b/src/zenserver/storage/admin/admin.h @@ -0,0 +1,46 @@ +// Copyright Epic Games, Inc. All Rights Reserved. + +#pragma once + +#include <zencore/compactbinary.h> +#include <zenhttp/httpserver.h> +#include <functional> + +namespace zen { + +class GcScheduler; +class JobQueue; +class ZenCacheStore; +struct ZenServerOptions; + +class HttpAdminService : public zen::HttpService +{ +public: + struct LogPaths + { + std::filesystem::path AbsLogPath; + std::filesystem::path HttpLogPath; + std::filesystem::path CacheLogPath; + }; + HttpAdminService(GcScheduler& Scheduler, + JobQueue& BackgroundJobQueue, + ZenCacheStore* CacheStore, + std::function<void()>&& FlushFunction, + const LogPaths& LogPaths, + const ZenServerOptions& ServerOptions); + ~HttpAdminService(); + + virtual const char* BaseUri() const override; + virtual void HandleRequest(zen::HttpServerRequest& Request) override; + +private: + HttpRequestRouter m_Router; + GcScheduler& m_GcScheduler; + JobQueue& m_BackgroundJobQueue; + ZenCacheStore* m_CacheStore; + std::function<void()> m_FlushFunction; + LogPaths m_LogPaths; + const ZenServerOptions& m_ServerOptions; +}; + +} // namespace zen |