From de3ef374983d987d8ffd8e8516a4877fe68b3e4e Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 8 Jul 2024 16:50:01 +0200 Subject: Use RemoteExecutionConfig instances stored in ApiBundle ...wherever an ApiBundle is already being passed. --- src/buildtool/serve_api/serve_service/configuration.hpp | 10 ++++++++++ 1 file changed, 10 insertions(+) (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 8a33b5b2..b374148a 100644 --- a/src/buildtool/serve_api/serve_service/configuration.hpp +++ b/src/buildtool/serve_api/serve_service/configuration.hpp @@ -15,13 +15,20 @@ #ifndef INCLUDED_SRC_BUILD_SERVE_API_SERVE_SERVICE_CONFIGURATION_HPP #define INCLUDED_SRC_BUILD_SERVE_API_SERVE_SERVICE_CONFIGURATION_HPP +#include "gsl/gsl" #include "justbuild/just_serve/just_serve.grpc.pb.h" +#include "src/buildtool/execution_api/remote/config.hpp" // This service can be used by the client to double-check the server // configuration. class ConfigurationService final : public justbuild::just_serve::Configuration::Service { public: + explicit ConfigurationService( + gsl::not_null const& + remote_config) noexcept + : 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 // as a remote execution endpoint. @@ -42,6 +49,9 @@ class ConfigurationService final const ::justbuild::just_serve::CompatibilityRequest* request, ::justbuild::just_serve::CompatibilityResponse* response) -> ::grpc::Status override; + + private: + RemoteExecutionConfig const& remote_config_; }; #endif // INCLUDED_SRC_BUILD_SERVE_API_SERVE_SERVICE_CONFIGURATION_HPP -- cgit v1.2.3