diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-02 11:35:51 +0100 |
---|---|---|
committer | Alberto Sartori <alberto.sartori@huawei.com> | 2023-11-15 20:19:18 +0100 |
commit | 40ed3ee050e0fc3d0f41fc46f7360d28b9a1f7cc (patch) | |
tree | e1096799ec23b3ae5009cbbead98ee5db559e54a /src/other_tools/just_mr/setup_utils.cpp | |
parent | e2e0e3b4e92885dd74127aacaabb0c5f3ba86ce7 (diff) | |
download | justbuild-40ed3ee050e0fc3d0f41fc46f7360d28b9a1f7cc.tar.gz |
just-mr: Update to using the static methods of ServeApi
Diffstat (limited to 'src/other_tools/just_mr/setup_utils.cpp')
-rw-r--r-- | src/other_tools/just_mr/setup_utils.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/other_tools/just_mr/setup_utils.cpp b/src/other_tools/just_mr/setup_utils.cpp index 332503ea..839b47a3 100644 --- a/src/other_tools/just_mr/setup_utils.cpp +++ b/src/other_tools/just_mr/setup_utils.cpp @@ -238,8 +238,8 @@ auto ReadConfiguration( } } -auto SetupRemoteApi(std::optional<std::string> const& remote_exec_addr, - MultiRepoRemoteAuthArguments const& auth) +auto GetRemoteApi(std::optional<std::string> const& remote_exec_addr, + MultiRepoRemoteAuthArguments const& auth) -> IExecutionApi::Ptr { // we only allow remotes in native mode if (remote_exec_addr and not Compatibility::IsCompatible()) { @@ -262,7 +262,7 @@ auto SetupRemoteApi(std::optional<std::string> const& remote_exec_addr, } auto SetupServeApi(std::optional<std::string> const& remote_serve_addr, - MultiRepoRemoteAuthArguments const& auth) -> ServeApi::Ptr { + MultiRepoRemoteAuthArguments const& auth) -> bool { if (remote_serve_addr) { // setup authentication SetupAuthConfig(auth); @@ -273,10 +273,9 @@ auto SetupServeApi(std::optional<std::string> const& remote_serve_addr, *remote_serve_addr); std::exit(kExitConfigError); } - auto address = RemoteServeConfig::RemoteAddress(); - return std::make_unique<ServeApi>(address->host, address->port); + return true; } - return nullptr; + return false; } } // namespace JustMR::Utils |