summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/execution_api/common')
-rw-r--r--src/buildtool/execution_api/common/api_bundle.cpp6
-rw-r--r--src/buildtool/execution_api/common/api_bundle.hpp4
2 files changed, 5 insertions, 5 deletions
diff --git a/src/buildtool/execution_api/common/api_bundle.cpp b/src/buildtool/execution_api/common/api_bundle.cpp
index 17e3d3af..41637eb4 100644
--- a/src/buildtool/execution_api/common/api_bundle.cpp
+++ b/src/buildtool/execution_api/common/api_bundle.cpp
@@ -19,10 +19,10 @@
#include "src/buildtool/execution_api/remote/bazel/bazel_api.hpp"
ApiBundle::ApiBundle(RepositoryConfig const* repo_config,
- Auth::TLS const* authentication,
+ gsl::not_null<Auth const*> const& authentication,
std::optional<ServerAddress> const& remote_address)
: local{std::make_shared<LocalApi>(repo_config)}, // needed by remote
- auth{authentication}, // needed by remote
+ auth{*authentication}, // needed by remote
remote{CreateRemote(remote_address)} {}
auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const
@@ -31,7 +31,7 @@ auto ApiBundle::CreateRemote(std::optional<ServerAddress> const& address) const
ExecutionConfiguration config;
config.skip_cache_lookup = false;
return std::make_shared<BazelApi>(
- "remote-execution", address->host, address->port, auth, config);
+ "remote-execution", address->host, address->port, &auth, config);
}
return local;
}
diff --git a/src/buildtool/execution_api/common/api_bundle.hpp b/src/buildtool/execution_api/common/api_bundle.hpp
index 72fdb687..0148b6af 100644
--- a/src/buildtool/execution_api/common/api_bundle.hpp
+++ b/src/buildtool/execution_api/common/api_bundle.hpp
@@ -29,14 +29,14 @@
/// exactly the same instance that local api is (&*remote == & *local).
struct ApiBundle final {
explicit ApiBundle(RepositoryConfig const* repo_config,
- Auth::TLS const* authentication,
+ gsl::not_null<Auth const*> const& authentication,
std::optional<ServerAddress> const& remote_address);
[[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::TLS const* auth; // needed by remote
+ Auth const& auth; // needed by remote
gsl::not_null<IExecutionApi::Ptr> const remote;
};