summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/server_implementation.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-25 14:53:18 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commit8669d48933731f224474a9b1dc55824f87ae26a7 (patch)
tree7d097fdf3f89e5fc88899c8e7f4723a4870f3e60 /src/buildtool/execution_api/execution_service/server_implementation.hpp
parent69f56ad981da59f026c83b321522ad68283934c5 (diff)
downloadjustbuild-8669d48933731f224474a9b1dc55824f87ae26a7.tar.gz
Use LocalContext in execution and serve services
The context is passed by not_null const pointer in order to avoid binding to temporaries, and it or parts of it get stored by const ref where needed.
Diffstat (limited to 'src/buildtool/execution_api/execution_service/server_implementation.hpp')
-rw-r--r--src/buildtool/execution_api/execution_service/server_implementation.hpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/buildtool/execution_api/execution_service/server_implementation.hpp b/src/buildtool/execution_api/execution_service/server_implementation.hpp
index d9e16dad..4df8375f 100644
--- a/src/buildtool/execution_api/execution_service/server_implementation.hpp
+++ b/src/buildtool/execution_api/execution_service/server_implementation.hpp
@@ -20,9 +20,9 @@
#include <optional>
#include <string>
+#include "gsl/gsl"
#include "src/buildtool/execution_api/common/api_bundle.hpp"
-#include "src/buildtool/storage/config.hpp"
-#include "src/buildtool/storage/storage.hpp"
+#include "src/buildtool/execution_api/local/context.hpp"
class ServerImpl final {
public:
@@ -42,13 +42,11 @@ class ServerImpl final {
auto operator=(ServerImpl&&) noexcept -> ServerImpl& = default;
/// \brief Start the execution service.
- /// \param storage_config StorageConfig to be used.
- /// \param storage Storage to be used.
+ /// \param local_context The LocalContext to be used.
/// \param apis Apis to be used, only local api is actually
/// needed.
/// \param op_exponent Log2 threshold for operation cache.
- auto Run(StorageConfig const& storage_config,
- Storage const& storage,
+ auto Run(gsl::not_null<LocalContext const*> const& local_context,
ApiBundle const& apis,
std::optional<std::uint8_t> op_exponent) -> bool;