aboutsummaryrefslogtreecommitdiff
path: root/src/zenserver/storage/zenstorageserver.h
diff options
context:
space:
mode:
authorStefan Boberg <[email protected]>2025-10-15 09:51:52 +0200
committerGitHub Enterprise <[email protected]>2025-10-15 09:51:52 +0200
commite747932819e2a64a1396cfbc3422a9b61c9470dc (patch)
tree1db1d13cf7fe873d71128a7879d269174f8eaf16 /src/zenserver/storage/zenstorageserver.h
parentrefactor builds cmd part3 (#573) (diff)
downloadzen-e747932819e2a64a1396cfbc3422a9b61c9470dc.tar.xz
zen-e747932819e2a64a1396cfbc3422a9b61c9470dc.zip
restructured zenserver configuration (#575)
this breaks out the configuration logic to allow multiple applications to share common configuration and initialization logic whilst customizing chosen aspects of the process
Diffstat (limited to 'src/zenserver/storage/zenstorageserver.h')
-rw-r--r--src/zenserver/storage/zenstorageserver.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/zenserver/storage/zenstorageserver.h b/src/zenserver/storage/zenstorageserver.h
index e4c31399d..f79c55bc8 100644
--- a/src/zenserver/storage/zenstorageserver.h
+++ b/src/zenserver/storage/zenstorageserver.h
@@ -39,13 +39,13 @@ public:
void SetDataRoot(std::filesystem::path Root) { m_DataRoot = Root; }
void SetContentRoot(std::filesystem::path Root) { m_ContentRoot = Root; }
- int Initialize(const ZenStorageServerOptions& ServerOptions, ZenServerState::ZenServerEntry* ServerEntry);
+ int Initialize(const ZenStorageServerConfig& ServerOptions, ZenServerState::ZenServerEntry* ServerEntry);
void Run();
void Cleanup();
private:
- void InitializeState(const ZenStorageServerOptions& ServerOptions);
- void InitializeStructuredCache(const ZenStorageServerOptions& ServerOptions);
+ void InitializeState(const ZenStorageServerConfig& ServerOptions);
+ void InitializeStructuredCache(const ZenStorageServerConfig& ServerOptions);
void Flush();
bool m_IsDedicatedMode = false;
@@ -62,9 +62,9 @@ private:
std::unique_ptr<AuthMgr> m_AuthMgr;
std::unique_ptr<HttpAuthService> m_AuthService;
- void InitializeAuthentication(const ZenStorageServerOptions& ServerOptions);
+ void InitializeAuthentication(const ZenStorageServerConfig& ServerOptions);
- void InitializeServices(const ZenStorageServerOptions& ServerOptions);
+ void InitializeServices(const ZenStorageServerConfig& ServerOptions);
void RegisterServices();
HttpStatsService m_StatsService;
@@ -97,17 +97,22 @@ private:
std::unique_ptr<HttpAdminService> m_AdminService;
};
+struct ZenStorageServerConfigurator;
+
class ZenStorageServerMain : public ZenServerMain
{
public:
- ZenStorageServerMain(ZenStorageServerOptions& ServerOptions);
+ ZenStorageServerMain(ZenStorageServerConfig& ServerOptions);
virtual void DoRun(ZenServerState::ZenServerEntry* Entry) override;
ZenStorageServerMain(const ZenStorageServerMain&) = delete;
ZenStorageServerMain& operator=(const ZenStorageServerMain&) = delete;
+ typedef ZenStorageServerConfig Config;
+ typedef ZenStorageServerConfigurator Configurator;
+
private:
- ZenStorageServerOptions& m_ServerOptions;
+ ZenStorageServerConfig& m_ServerOptions;
};
} // namespace zen