summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/execution_service/execution_server.hpp
diff options
context:
space:
mode:
authorAlberto Sartori <alberto.sartori@huawei.com>2023-02-15 16:41:04 +0100
committerAlberto Sartori <alberto.sartori@huawei.com>2023-02-15 16:41:10 +0100
commit26241c70ac144eb3eb90b4336ecf6ad5248a367b (patch)
treedce9fe60e43e942593742a250cdf2b0df098a42b /src/buildtool/execution_api/execution_service/execution_server.hpp
parentdfcd8d353ff8e8920d9ad8e1e56f79f5a54b73ea (diff)
downloadjustbuild-26241c70ac144eb3eb90b4336ecf6ad5248a367b.tar.gz
execution service: use alias namespace
Diffstat (limited to 'src/buildtool/execution_api/execution_service/execution_server.hpp')
-rw-r--r--src/buildtool/execution_api/execution_service/execution_server.hpp48
1 files changed, 20 insertions, 28 deletions
diff --git a/src/buildtool/execution_api/execution_service/execution_server.hpp b/src/buildtool/execution_api/execution_service/execution_server.hpp
index 365858bd..e151ffc2 100644
--- a/src/buildtool/execution_api/execution_service/execution_server.hpp
+++ b/src/buildtool/execution_api/execution_service/execution_server.hpp
@@ -16,12 +16,12 @@
#define EXECUTION_SERVER_HPP
#include "build/bazel/remote/execution/v2/remote_execution.grpc.pb.h"
+#include "src/buildtool/common/bazel_types.hpp"
#include "src/buildtool/execution_api/local/local_api.hpp"
#include "src/buildtool/execution_api/local/local_storage.hpp"
#include "src/buildtool/logging/logger.hpp"
-class ExecutionServiceImpl final
- : public build::bazel::remote::execution::v2::Execution::Service {
+class ExecutionServiceImpl final : public bazel_re::Execution::Service {
public:
ExecutionServiceImpl() = default;
// Execute an action remotely.
@@ -88,10 +88,9 @@ class ExecutionServiceImpl final
// where, for each requested blob not present in the CAS, there is a
// `Violation` with a `type` of `MISSING` and a `subject` of
// `"blobs/{hash}/{size}"` indicating the digest of the missing blob.
- auto Execute(
- ::grpc::ServerContext* context,
- const ::build::bazel::remote::execution::v2::ExecuteRequest* request,
- ::grpc::ServerWriter<::google::longrunning::Operation>* writer)
+ auto Execute(::grpc::ServerContext* context,
+ const ::bazel_re::ExecuteRequest* request,
+ ::grpc::ServerWriter<::google::longrunning::Operation>* writer)
-> ::grpc::Status override;
// Wait for an execution operation to complete. When the client initially
@@ -103,46 +102,39 @@ class ExecutionServiceImpl final
// execution.
auto WaitExecution(
::grpc::ServerContext* context,
- const ::build::bazel::remote::execution::v2::WaitExecutionRequest*
- request,
+ const ::bazel_re::WaitExecutionRequest* request,
::grpc::ServerWriter<::google::longrunning::Operation>* writer)
-> ::grpc::Status override;
private:
- [[nodiscard]] auto GetAction(
- ::build::bazel::remote::execution::v2::ExecuteRequest const* request)
- const noexcept -> std::pair<
- std::optional<::build::bazel::remote::execution::v2::Action>,
- std::optional<std::string>>;
- [[nodiscard]] auto GetCommand(
- ::build::bazel::remote::execution::v2::Action const& action)
- const noexcept -> std::pair<
- std::optional<::build::bazel::remote::execution::v2::Command>,
- std::optional<std::string>>;
+ [[nodiscard]] auto GetAction(::bazel_re::ExecuteRequest const* request)
+ const noexcept -> std::pair<std::optional<::bazel_re::Action>,
+ std::optional<std::string>>;
+ [[nodiscard]] auto GetCommand(::bazel_re::Action const& action)
+ const noexcept -> std::pair<std::optional<::bazel_re::Command>,
+ std::optional<std::string>>;
[[nodiscard]] auto GetIExecutionAction(
- ::build::bazel::remote::execution::v2::ExecuteRequest const* request,
- ::build::bazel::remote::execution::v2::Action const& action) const
+ ::bazel_re::ExecuteRequest const* request,
+ ::bazel_re::Action const& action) const
-> std::pair<std::optional<IExecutionAction::Ptr>,
std::optional<std::string>>;
[[nodiscard]] auto GetResponse(
- ::build::bazel::remote::execution::v2::ExecuteRequest const* request,
+ ::bazel_re::ExecuteRequest const* request,
IExecutionResponse::Ptr const& i_execution_response) const noexcept
- -> std::pair<
- std::optional<
- ::build::bazel::remote::execution::v2::ExecuteResponse>,
- std::optional<std::string>>;
+ -> std::pair<std::optional<::bazel_re::ExecuteResponse>,
+ std::optional<std::string>>;
[[nodiscard]] auto WriteResponse(
- ::build::bazel::remote::execution::v2::ExecuteRequest const* request,
+ ::bazel_re::ExecuteRequest const* request,
IExecutionResponse::Ptr const& i_execution_response,
- ::build::bazel::remote::execution::v2::Action const& action,
+ ::bazel_re::Action const& action,
::grpc::ServerWriter<::google::longrunning::Operation>* writer)
const noexcept -> std::optional<std::string>;
[[nodiscard]] auto AddResult(
- ::build::bazel::remote::execution::v2::ExecuteResponse* response,
+ ::bazel_re::ExecuteResponse* response,
IExecutionResponse::Ptr const& i_execution_response,
std::string const& hash) const noexcept -> std::optional<std::string>;
LocalStorage storage_{};