summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/execution_server.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/execution_server.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/execution_server.hpp')
-rw-r--r--src/buildtool/execution_api/execution_service/execution_server.hpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/buildtool/execution_api/execution_service/execution_server.hpp b/src/buildtool/execution_api/execution_service/execution_server.hpp
index 7107ed45..e09f028b 100644
--- a/src/buildtool/execution_api/execution_service/execution_server.hpp
+++ b/src/buildtool/execution_api/execution_service/execution_server.hpp
@@ -25,6 +25,7 @@
#include "src/buildtool/common/bazel_types.hpp"
#include "src/buildtool/execution_api/common/execution_api.hpp"
#include "src/buildtool/execution_api/execution_service/operation_cache.hpp"
+#include "src/buildtool/execution_api/local/context.hpp"
#include "src/buildtool/logging/logger.hpp"
#include "src/buildtool/storage/config.hpp"
#include "src/buildtool/storage/storage.hpp"
@@ -32,12 +33,11 @@
class ExecutionServiceImpl final : public bazel_re::Execution::Service {
public:
explicit ExecutionServiceImpl(
- gsl::not_null<StorageConfig const*> const& storage_config,
- gsl::not_null<Storage const*> const& storage,
+ gsl::not_null<LocalContext const*> const& local_context,
gsl::not_null<IExecutionApi const*> const& local_api,
std::optional<std::uint8_t> op_exponent) noexcept
- : storage_config_{*storage_config},
- storage_{*storage},
+ : storage_config_{*local_context->storage_config},
+ storage_{*local_context->storage},
api_{*local_api} {
if (op_exponent) {
op_cache_.SetExponent(*op_exponent);