diff options
Diffstat (limited to 'src/buildtool/execution_api/common')
-rw-r--r-- | src/buildtool/execution_api/common/TARGETS | 1 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.cpp | 5 | ||||
-rw-r--r-- | src/buildtool/execution_api/common/api_bundle.hpp | 4 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/common/TARGETS b/src/buildtool/execution_api/common/TARGETS index 8237b350..a96727ab 100644 --- a/src/buildtool/execution_api/common/TARGETS +++ b/src/buildtool/execution_api/common/TARGETS @@ -46,6 +46,7 @@ , ["src/buildtool/common", "config"] , ["src/buildtool/common/remote", "remote_common"] , ["src/buildtool/execution_api/local", "config"] + , ["src/buildtool/execution_api/remote", "config"] , ["src/buildtool/storage", "config"] , ["src/buildtool/storage", "storage"] ] diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp index 0c763493..d9a588a3 100644 --- a/src/buildtool/execution_api/common/api_bundle.cpp +++ b/src/buildtool/execution_api/common/api_bundle.cpp @@ -24,13 +24,14 @@ ApiBundle::ApiBundle( gsl::not_null<LocalExecutionConfig const*> const& local_exec_config, RepositoryConfig const* repo_config, gsl::not_null<Auth const*> const& authentication, - std::optional<ServerAddress> const& remote_address) + gsl::not_null<RemoteExecutionConfig const*> const& remote_exec_config) : local{std::make_shared<LocalApi>(storage_config, storage, local_exec_config, repo_config)}, // needed by remote auth{*authentication}, // needed by remote - remote{CreateRemote(remote_address)} {} + remote_config{*remote_exec_config}, // needed by remote + remote{CreateRemote(remote_exec_config->RemoteAddress())} {} auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const -> gsl::not_null<IExecutionApi::Ptr> { diff --git a/src/buildtool/execution_api/common/api_bundle.hpp b/src/buildtool/execution_api/common/api_bundle.hpp index ca2e91d1..017154c1 100644 --- a/src/buildtool/execution_api/common/api_bundle.hpp +++ b/src/buildtool/execution_api/common/api_bundle.hpp @@ -24,6 +24,7 @@ #include "src/buildtool/common/repository_config.hpp" #include "src/buildtool/execution_api/common/execution_api.hpp" #include "src/buildtool/execution_api/local/config.hpp" +#include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/storage/config.hpp" #include "src/buildtool/storage/storage.hpp" @@ -37,13 +38,14 @@ struct ApiBundle final { gsl::not_null<LocalExecutionConfig const*> const& local_exec_config, RepositoryConfig const* repo_config, gsl::not_null<Auth const*> const& authentication, - std::optional<ServerAddress> const& remote_address); + gsl::not_null<RemoteExecutionConfig const*> const& remote_exec_config); [[nodiscard]] auto CreateRemote(std::optional<ServerAddress> const& address) const -> gsl::not_null<IExecutionApi::Ptr>; gsl::not_null<IExecutionApi::Ptr> const local; // needed by remote Auth const& auth; // needed by remote + RemoteExecutionConfig const& remote_config; // needed by remote gsl::not_null<IExecutionApi::Ptr> const remote; }; |