From 27a696c4d6d5815b4355d93c767e499028bb7e2f Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Wed, 11 Sep 2024 18:03:55 +0200 Subject: Pass HashFunction::Type to CapabilitiesServer ...to get the protocol type. --- .../execution_api/execution_service/capabilities_server.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/buildtool/execution_api/execution_service/capabilities_server.hpp') diff --git a/src/buildtool/execution_api/execution_service/capabilities_server.hpp b/src/buildtool/execution_api/execution_service/capabilities_server.hpp index 57c49fc9..d1706584 100644 --- a/src/buildtool/execution_api/execution_service/capabilities_server.hpp +++ b/src/buildtool/execution_api/execution_service/capabilities_server.hpp @@ -17,9 +17,13 @@ #include "build/bazel/remote/execution/v2/remote_execution.grpc.pb.h" #include "src/buildtool/common/bazel_types.hpp" +#include "src/buildtool/crypto/hash_function.hpp" class CapabilitiesServiceImpl final : public bazel_re::Capabilities::Service { public: + explicit CapabilitiesServiceImpl(HashFunction::Type hash_type) noexcept + : hash_type_{hash_type} {} + // GetCapabilities returns the server capabilities configuration of the // remote endpoint. // Only the capabilities of the services supported by the endpoint will @@ -32,5 +36,8 @@ class CapabilitiesServiceImpl final : public bazel_re::Capabilities::Service { const ::bazel_re::GetCapabilitiesRequest* request, ::bazel_re::ServerCapabilities* response) -> ::grpc::Status override; + + private: + HashFunction::Type const hash_type_; }; -#endif +#endif // CAPABILITIES_SERVER_HPP -- cgit v1.2.3