summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/target.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-25 17:40:18 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-30 12:10:06 +0200
commitc499f460cd68d505338d9c081863418a413d1c0f (patch)
tree53b93aea0b3b369c3b386a6acd4684172faa3e23 /src/buildtool/serve_api/serve_service/target.hpp
parentb5a92a60035ea3731a96bbdc8bca18986b558a05 (diff)
downloadjustbuild-c499f460cd68d505338d9c081863418a413d1c0f.tar.gz
Use RemoteContext in serve services
Also switch to using the fields from RemoteContext instances instead of those from ApiBundle.
Diffstat (limited to 'src/buildtool/serve_api/serve_service/target.hpp')
-rw-r--r--src/buildtool/serve_api/serve_service/target.hpp4
1 files changed, 4 insertions, 0 deletions
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<RemoteServeConfig const*> const& serve_config,
gsl::not_null<LocalContext const*> const& local_context,
+ gsl::not_null<RemoteContext const*> const& remote_context,
gsl::not_null<ApiBundle const*> 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> logger_{std::make_shared<Logger>("target-service")};