summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/execution_server.hpp
diff options
context:
space:
mode:
authorMaksim Denisov <denisov.maksim@huawei.com>2024-06-27 12:36:22 +0200
committerMaksim Denisov <denisov.maksim@huawei.com>2024-07-05 12:58:35 +0200
commit0d8a4ad15b93283cc31787b039051b9e9a285ba8 (patch)
tree40efbd2206659d6836ec0b3beec0811d2a01644f /src/buildtool/execution_api/execution_service/execution_server.hpp
parentf82adab238f4b45d43049687c8e52bf7372ba053 (diff)
downloadjustbuild-0d8a4ad15b93283cc31787b039051b9e9a285ba8.tar.gz
Pass StorageConfig and Storage to ServerImpl
Diffstat (limited to 'src/buildtool/execution_api/execution_service/execution_server.hpp')
-rw-r--r--src/buildtool/execution_api/execution_service/execution_server.hpp11
1 files changed, 9 insertions, 2 deletions
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<StorageConfig const*> const& storage_config,
+ gsl::not_null<Storage const*> const& storage,
gsl::not_null<IExecutionApi const*> 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 const*> storage_ = &Storage::Instance();
+ StorageConfig const& storage_config_;
+ Storage const& storage_;
IExecutionApi const& api_;
Logger logger_{"execution-service"};