From 0d8a4ad15b93283cc31787b039051b9e9a285ba8 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 27 Jun 2024 12:36:22 +0200 Subject: Pass StorageConfig and Storage to ServerImpl --- .../execution_api/execution_service/execution_server.hpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/buildtool/execution_api/execution_service/execution_server.hpp') diff --git a/src/buildtool/execution_api/execution_service/execution_server.hpp b/src/buildtool/execution_api/execution_service/execution_server.hpp index 98223938..cc72a1e3 100644 --- a/src/buildtool/execution_api/execution_service/execution_server.hpp +++ b/src/buildtool/execution_api/execution_service/execution_server.hpp @@ -20,13 +20,19 @@ #include "src/buildtool/common/bazel_types.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/logging/logger.hpp" +#include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/storage.hpp" class ExecutionServiceImpl final : public bazel_re::Execution::Service { public: explicit ExecutionServiceImpl( + gsl::not_null const& storage_config, + gsl::not_null const& storage, gsl::not_null const& local_api) noexcept - : api_{*local_api} {} + : storage_config_{*storage_config}, + storage_{*storage}, + api_{*local_api} {} + // Execute an action remotely. // // In order to execute an action, the client must first upload all of the @@ -110,7 +116,8 @@ class ExecutionServiceImpl final : public bazel_re::Execution::Service { -> ::grpc::Status override; private: - gsl::not_null storage_ = &Storage::Instance(); + StorageConfig const& storage_config_; + Storage const& storage_; IExecutionApi const& api_; Logger logger_{"execution-service"}; -- cgit v1.2.3