From c499f460cd68d505338d9c081863418a413d1c0f Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 25 Jul 2024 17:40:18 +0200 Subject: Use RemoteContext in serve services Also switch to using the fields from RemoteContext instances instead of those from ApiBundle. --- src/buildtool/serve_api/serve_service/target.hpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/buildtool/serve_api/serve_service/target.hpp') diff --git a/src/buildtool/serve_api/serve_service/target.hpp b/src/buildtool/serve_api/serve_service/target.hpp index 89076f05..04459d08 100644 --- a/src/buildtool/serve_api/serve_service/target.hpp +++ b/src/buildtool/serve_api/serve_service/target.hpp @@ -32,6 +32,7 @@ #include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/execution_api/local/context.hpp" #include "src/buildtool/execution_api/remote/config.hpp" +#include "src/buildtool/execution_api/remote/context.hpp" #include "src/buildtool/logging/logger.hpp" #include "src/buildtool/serve_api/remote/config.hpp" #include "src/buildtool/serve_api/remote/serve_api.hpp" @@ -43,10 +44,12 @@ class TargetService final : public justbuild::just_serve::Target::Service { explicit TargetService( gsl::not_null const& serve_config, gsl::not_null const& local_context, + gsl::not_null const& remote_context, gsl::not_null const& apis, ServeApi const* serve = nullptr) noexcept : serve_config_{*serve_config}, local_context_{*local_context}, + remote_context_{*remote_context}, apis_{*apis}, serve_{serve} {} @@ -128,6 +131,7 @@ class TargetService final : public justbuild::just_serve::Target::Service { private: RemoteServeConfig const& serve_config_; LocalContext const& local_context_; + RemoteContext const& remote_context_; ApiBundle const& apis_; ServeApi const* const serve_ = nullptr; std::shared_ptr logger_{std::make_shared("target-service")}; -- cgit v1.2.3