diff options
| author | Stefan Boberg <[email protected]> | 2023-10-11 10:03:54 +0200 |
|---|---|---|
| committer | GitHub <[email protected]> | 2023-10-11 10:03:54 +0200 |
| commit | 1ad940fafb5e3eae7b308dd290b6de6ade69a3eb (patch) | |
| tree | 1d1efe188f45bc422292e75c6784929765882771 /src/zenserver/compute/function.h | |
| parent | fix clang-format whoopsie (diff) | |
| download | zen-1ad940fafb5e3eae7b308dd290b6de6ade69a3eb.tar.xz zen-1ad940fafb5e3eae7b308dd290b6de6ade69a3eb.zip | |
remove legacy compute interfaces (#461)
* removed legacy compute code, which will be replaced with a new implementation in the future
* also updated references to Jupiter storage
Diffstat (limited to 'src/zenserver/compute/function.h')
| -rw-r--r-- | src/zenserver/compute/function.h | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/src/zenserver/compute/function.h b/src/zenserver/compute/function.h deleted file mode 100644 index 650cee757..000000000 --- a/src/zenserver/compute/function.h +++ /dev/null @@ -1,73 +0,0 @@ -// Copyright Epic Games, Inc. All Rights Reserved. - -#pragma once - -#include <zencore/zencore.h> - -#if !defined(ZEN_WITH_COMPUTE_SERVICES) -# define ZEN_WITH_COMPUTE_SERVICES 1 -#endif - -#if ZEN_WITH_COMPUTE_SERVICES - -# include <zencore/compactbinary.h> -# include <zencore/iohash.h> -# include <zencore/logging.h> -# include <zenhttp/httpserver.h> - -# include <filesystem> -# include <unordered_map> - -namespace zen { - -class CidStore; -class UpstreamApply; -class CloudCacheClient; -class AuthMgr; - -struct UpstreamAuthConfig; -struct CloudCacheClientOptions; - -/** - * Lambda style compute function service - */ -class HttpFunctionService : public HttpService -{ -public: - HttpFunctionService(CidStore& InCidStore, - const CloudCacheClientOptions& ComputeOptions, - const CloudCacheClientOptions& StorageOptions, - const UpstreamAuthConfig& ComputeAuthConfig, - const UpstreamAuthConfig& StorageAuthConfig, - AuthMgr& Mgr); - ~HttpFunctionService(); - - virtual const char* BaseUri() const override; - virtual void HandleRequest(HttpServerRequest& Request) override; - -private: - std::thread InitializeThread; - spdlog::logger& Log() { return m_Log; } - spdlog::logger& m_Log; - HttpRequestRouter m_Router; - CidStore& m_CidStore; - std::unique_ptr<UpstreamApply> m_UpstreamApply; - - struct WorkerDesc - { - CbObject Descriptor; - }; - - [[nodiscard]] HttpResponseCode ExecActionUpstream(const WorkerDesc& Worker, CbObject& Object); - [[nodiscard]] HttpResponseCode ExecActionUpstreamResult(const IoHash& WorkerId, CbObject& Object); - - [[nodiscard]] HttpResponseCode ExecActionUpstream(const WorkerDesc& Worker, CbObject Action, CbObject& Object); - [[nodiscard]] HttpResponseCode ExecActionUpstreamResult(const IoHash& WorkerId, const IoHash& ActionId, CbPackage& Package); - - RwLock m_WorkerLock; - std::unordered_map<IoHash, WorkerDesc> m_WorkerMap; -}; - -} // namespace zen - -#endif // ZEN_WITH_COMPUTE_SERVICES |