aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/admin/admin.h
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2023-10-18 21:53:59 +0200
committerGitHub <[email protected]>2023-10-18 21:53:59 +0200
commit6db4b4d1e023f4c17f12cb0915e0552f21d705f7 (patch)
treea380f15a653be4dc273eefaca1599467a7866b6e /src/zenserver/admin/admin.h
parent0.2.28 (diff)
downloadzen-6db4b4d1e023f4c17f12cb0915e0552f21d705f7.tar.xz
zen-6db4b4d1e023f4c17f12cb0915e0552f21d705f7.zip
add `flush` command and more gc status info (#483)
- Feature: New endpoint `/admin/flush ` to flush all storage - CAS, Cache and ProjectStore - Feature: New command `zen flush` to flush all storage - CAS, Cache and ProjectStore - Improved: Command `zen gc-status` now gives details about storage, when last GC occured, how long until next GC etc - Changed: Cache access and write log are disabled by default
Diffstat (limited to 'src/zenserver/admin/admin.h')
-rw-r--r--src/zenserver/admin/admin.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/zenserver/admin/admin.h b/src/zenserver/admin/admin.h
index 12a47f29e..9d8bdfe50 100644
--- a/src/zenserver/admin/admin.h
+++ b/src/zenserver/admin/admin.h
@@ -10,6 +10,8 @@ namespace zen {
class GcScheduler;
class JobQueue;
class ZenCacheStore;
+class CidStore;
+class ProjectStore;
class HttpAdminService : public zen::HttpService
{
@@ -20,7 +22,12 @@ public:
std::filesystem::path HttpLogPath;
std::filesystem::path CacheLogPath;
};
- HttpAdminService(GcScheduler& Scheduler, JobQueue& BackgroundJobQueue, ZenCacheStore& CacheStore, const LogPaths& LogPaths);
+ HttpAdminService(GcScheduler& Scheduler,
+ JobQueue& BackgroundJobQueue,
+ ZenCacheStore* CacheStore,
+ CidStore* CidStore,
+ ProjectStore* ProjectStore,
+ const LogPaths& LogPaths);
~HttpAdminService();
virtual const char* BaseUri() const override;
@@ -30,7 +37,9 @@ private:
HttpRequestRouter m_Router;
GcScheduler& m_GcScheduler;
JobQueue& m_BackgroundJobQueue;
- ZenCacheStore& m_CacheStore;
+ ZenCacheStore* m_CacheStore;
+ CidStore* m_CidStore;
+ ProjectStore* m_ProjectStore;
LogPaths m_LogPaths;
};