From 53893aa9c7109ab157afecc4f073a27b32d372b4 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 12 Sep 2024 09:58:46 +0200 Subject: Pass HashFunction::Type to ConfigurationService ...to get the protocol type. --- src/buildtool/serve_api/serve_service/configuration.hpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/buildtool/serve_api/serve_service/configuration.hpp') diff --git a/src/buildtool/serve_api/serve_service/configuration.hpp b/src/buildtool/serve_api/serve_service/configuration.hpp index b374148a..90dceab2 100644 --- a/src/buildtool/serve_api/serve_service/configuration.hpp +++ b/src/buildtool/serve_api/serve_service/configuration.hpp @@ -17,6 +17,7 @@ #include "gsl/gsl" #include "justbuild/just_serve/just_serve.grpc.pb.h" +#include "src/buildtool/crypto/hash_function.hpp" #include "src/buildtool/execution_api/remote/config.hpp" // This service can be used by the client to double-check the server @@ -25,9 +26,10 @@ class ConfigurationService final : public justbuild::just_serve::Configuration::Service { public: explicit ConfigurationService( + HashFunction::Type hash_type, gsl::not_null const& remote_config) noexcept - : remote_config_{*remote_config} {}; + : hash_type_{hash_type}, remote_config_{*remote_config} {}; // Returns the address of the associated remote endpoint, if set, // or an empty string signaling that the serve endpoint acts also @@ -51,6 +53,7 @@ class ConfigurationService final -> ::grpc::Status override; private: + HashFunction::Type hash_type_; RemoteExecutionConfig const& remote_config_; }; -- cgit v1.2.3