diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-25 14:53:18 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-07-30 12:10:06 +0200 |
commit | 8669d48933731f224474a9b1dc55824f87ae26a7 (patch) | |
tree | 7d097fdf3f89e5fc88899c8e7f4723a4870f3e60 /src/buildtool/execution_api/execution_service/cas_server.hpp | |
parent | 69f56ad981da59f026c83b321522ad68283934c5 (diff) | |
download | justbuild-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/cas_server.hpp')
-rw-r--r-- | src/buildtool/execution_api/execution_service/cas_server.hpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/execution_service/cas_server.hpp b/src/buildtool/execution_api/execution_service/cas_server.hpp index 5ad9e799..3c84ade1 100644 --- a/src/buildtool/execution_api/execution_service/cas_server.hpp +++ b/src/buildtool/execution_api/execution_service/cas_server.hpp @@ -21,6 +21,7 @@ #include "build/bazel/remote/execution/v2/remote_execution.grpc.pb.h" #include "gsl/gsl" #include "src/buildtool/common/bazel_types.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" @@ -29,9 +30,9 @@ class CASServiceImpl final : public bazel_re::ContentAddressableStorage::Service { public: explicit CASServiceImpl( - gsl::not_null<StorageConfig const*> const& storage_config, - gsl::not_null<Storage const*> const& storage) noexcept - : storage_config_{*storage_config}, storage_{*storage} {} + gsl::not_null<LocalContext const*> const& local_context) noexcept + : storage_config_{*local_context->storage_config}, + storage_{*local_context->storage} {} // Determine if blobs are present in the CAS. // |