summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/target_client.cpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-12 16:09:28 +0200
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-07-16 17:51:12 +0200
commit62d204ff4cc94c12c1635f189255710901682825 (patch)
tree0c5cdc5faf98d28ddf74721280756804a6decf83 /src/buildtool/serve_api/remote/target_client.cpp
parentde3ef374983d987d8ffd8e8516a4877fe68b3e4e (diff)
downloadjustbuild-62d204ff4cc94c12c1635f189255710901682825.tar.gz
Remove the RemoteExecutionConfig singleton
...and replace it with passed instances created early via a builder pattern. Tests are also updated accordingly.
Diffstat (limited to 'src/buildtool/serve_api/remote/target_client.cpp')
-rw-r--r--src/buildtool/serve_api/remote/target_client.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/buildtool/serve_api/remote/target_client.cpp b/src/buildtool/serve_api/remote/target_client.cpp
index d36b518e..1d3a385b 100644
--- a/src/buildtool/serve_api/remote/target_client.cpp
+++ b/src/buildtool/serve_api/remote/target_client.cpp
@@ -60,7 +60,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key,
request.mutable_target_cache_key_id()->CopyFrom(key_dgst);
// add execution properties to request
- for (auto const& [k, v] : apis_.remote_config.PlatformProperties()) {
+ for (auto const& [k, v] : apis_.remote_config.platform_properties) {
auto* prop = request.add_execution_properties();
prop->set_name(k);
prop->set_value(v);
@@ -70,8 +70,7 @@ auto TargetClient::ServeTarget(const TargetCacheKey& key,
// to remote cas
auto dispatch_list = nlohmann::json::array();
try {
- for (auto const& [props, endpoint] :
- apis_.remote_config.DispatchList()) {
+ for (auto const& [props, endpoint] : apis_.remote_config.dispatch) {
auto entry = nlohmann::json::array();
entry.push_back(nlohmann::json(props));
entry.push_back(endpoint.ToJson());