diff options
author | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-20 12:50:02 +0200 |
---|---|---|
committer | Maksim Denisov <denisov.maksim@huawei.com> | 2024-06-25 13:59:48 +0200 |
commit | c2817da6d108acc38f17bf29900aa66d71337b34 (patch) | |
tree | 67a01416fe0ca645fc2957f6c33cbb987cded3a2 /src/buildtool/execution_api/execution_service/execution_server.hpp | |
parent | a08816fe82c04fbbc459d10b410efca27d260a20 (diff) | |
download | justbuild-c2817da6d108acc38f17bf29900aa66d71337b34.tar.gz |
Pass ApiBundle 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.hpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/execution_service/execution_server.hpp b/src/buildtool/execution_api/execution_service/execution_server.hpp index 198b5f14..48f50624 100644 --- a/src/buildtool/execution_api/execution_service/execution_server.hpp +++ b/src/buildtool/execution_api/execution_service/execution_server.hpp @@ -18,13 +18,15 @@ #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/local_api.hpp" +#include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/storage/storage.hpp" class ExecutionServiceImpl final : public bazel_re::Execution::Service { public: - ExecutionServiceImpl() = default; + explicit ExecutionServiceImpl( + gsl::not_null<IExecutionApi*> const& local_api) noexcept + : api_{local_api} {} // Execute an action remotely. // // In order to execute an action, the client must first upload all of the @@ -109,7 +111,7 @@ class ExecutionServiceImpl final : public bazel_re::Execution::Service { private: gsl::not_null<Storage const*> storage_ = &Storage::Instance(); - IExecutionApi::Ptr api_{new LocalApi()}; + gsl::not_null<IExecutionApi*> const api_; Logger logger_{"execution-service"}; [[nodiscard]] auto GetAction(::bazel_re::ExecuteRequest const* request) |