From c7f83a2d2fa436bf78911e288e1f07576861601e Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 20 Jun 2024 10:44:52 +0200 Subject: Pass ApiBundle to ServeApi --- src/buildtool/serve_api/remote/target_client.hpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) (limited to 'src/buildtool/serve_api/remote/target_client.hpp') diff --git a/src/buildtool/serve_api/remote/target_client.hpp b/src/buildtool/serve_api/remote/target_client.hpp index bc3aa382..35bb2d29 100644 --- a/src/buildtool/serve_api/remote/target_client.hpp +++ b/src/buildtool/serve_api/remote/target_client.hpp @@ -52,7 +52,8 @@ using serve_target_result_t = /// src/buildtool/serve_api/serve_service/just_serve.proto class TargetClient { public: - explicit TargetClient(ServerAddress const& address) noexcept; + explicit TargetClient(ServerAddress const& address, + gsl::not_null const& apis) noexcept; /// \brief Retrieve the pair of TargetCacheEntry and ObjectInfo associated /// to the given key. @@ -86,14 +87,9 @@ class TargetClient { const noexcept -> std::optional; private: + ApiBundle const& apis_; std::unique_ptr stub_; Logger logger_{"RemoteTargetClient"}; - gsl::not_null const remote_api_{ - CreateExecutionApi(RemoteExecutionConfig::RemoteAddress(), - std::nullopt, - "remote-execution")}; - gsl::not_null const local_api_{ - CreateExecutionApi(std::nullopt)}; }; #endif // INCLUDED_SRC_BUILDTOOL_SERVE_API_TARGET_CLIENT_HPP -- cgit v1.2.3