From f82adab238f4b45d43049687c8e52bf7372ba053 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Thu, 27 Jun 2024 12:22:09 +0200 Subject: Pass StorageConfig and Storage to Serve --- src/buildtool/serve_api/remote/target_client.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/buildtool/serve_api/remote/target_client.cpp') diff --git a/src/buildtool/serve_api/remote/target_client.cpp b/src/buildtool/serve_api/remote/target_client.cpp index 526121ab..fd886254 100644 --- a/src/buildtool/serve_api/remote/target_client.cpp +++ b/src/buildtool/serve_api/remote/target_client.cpp @@ -25,11 +25,11 @@ #include "src/buildtool/common/remote/client_common.hpp" #include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/logging/log_level.hpp" -#include "src/buildtool/storage/storage.hpp" TargetClient::TargetClient(ServerAddress const& address, + gsl::not_null const& storage, gsl::not_null const& apis) noexcept - : apis_{*apis} { + : storage_{*storage}, apis_{*apis} { stub_ = justbuild::just_serve::Target::NewStub( CreateChannelWithCredentials(address.host, address.port, &apis->auth)); } @@ -84,8 +84,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key, ex.what())}; } - auto dispatch_dgst = - Storage::Instance().CAS().StoreBlob(dispatch_list.dump(2)); + auto dispatch_dgst = storage_.CAS().StoreBlob(dispatch_list.dump(2)); if (not dispatch_dgst) { return serve_target_result_t{ std::in_place_index<1>, -- cgit v1.2.3