diff options
Diffstat (limited to 'src')
4 files changed, 8 insertions, 3 deletions
diff --git a/src/buildtool/execution_api/execution_service/TARGETS b/src/buildtool/execution_api/execution_service/TARGETS index 270d103d..7b3ecdb6 100644 --- a/src/buildtool/execution_api/execution_service/TARGETS +++ b/src/buildtool/execution_api/execution_service/TARGETS @@ -75,6 +75,7 @@ , "deps": [ ["src/buildtool/execution_api/common", "api_bundle"] , ["src/buildtool/execution_api/local", "context"] + , ["src/buildtool/execution_api/remote", "context"] ] , "private-deps": [ "execution_server" @@ -83,7 +84,6 @@ , "bytestream_server" , "capabilities_server" , "operations_server" - , ["src/buildtool/execution_api/remote", "config"] , ["src/buildtool/logging", "log_level"] , ["src/buildtool/logging", "logging"] , ["@", "json", "", "json"] diff --git a/src/buildtool/execution_api/execution_service/server_implementation.cpp b/src/buildtool/execution_api/execution_service/server_implementation.cpp index 11be6309..43edd6aa 100644 --- a/src/buildtool/execution_api/execution_service/server_implementation.cpp +++ b/src/buildtool/execution_api/execution_service/server_implementation.cpp @@ -34,7 +34,6 @@ #include "src/buildtool/execution_api/execution_service/cas_server.hpp" #include "src/buildtool/execution_api/execution_service/execution_server.hpp" #include "src/buildtool/execution_api/execution_service/operations_server.hpp" -#include "src/buildtool/execution_api/remote/config.hpp" #include "src/buildtool/logging/log_level.hpp" #include "src/buildtool/logging/logger.hpp" @@ -82,6 +81,7 @@ auto ServerImpl::Create(std::optional<std::string> interface, } auto ServerImpl::Run(gsl::not_null<LocalContext const*> const& local_context, + gsl::not_null<RemoteContext const*> const& remote_context, ApiBundle const& apis, std::optional<std::uint8_t> op_exponent) -> bool { ExecutionServiceImpl es{local_context, &*apis.local, op_exponent}; @@ -102,7 +102,8 @@ auto ServerImpl::Run(gsl::not_null<LocalContext const*> const& local_context, // check authentication credentials; currently only TLS/SSL is supported std::shared_ptr<grpc::ServerCredentials> creds; - if (const auto* tls_auth = std::get_if<Auth::TLS>(&apis.auth.method); + if (const auto* tls_auth = + std::get_if<Auth::TLS>(&remote_context->auth->method); tls_auth != nullptr) { auto tls_opts = grpc::SslServerCredentialsOptions{}; diff --git a/src/buildtool/execution_api/execution_service/server_implementation.hpp b/src/buildtool/execution_api/execution_service/server_implementation.hpp index 4df8375f..932011c0 100644 --- a/src/buildtool/execution_api/execution_service/server_implementation.hpp +++ b/src/buildtool/execution_api/execution_service/server_implementation.hpp @@ -23,6 +23,7 @@ #include "gsl/gsl" #include "src/buildtool/execution_api/common/api_bundle.hpp" #include "src/buildtool/execution_api/local/context.hpp" +#include "src/buildtool/execution_api/remote/context.hpp" class ServerImpl final { public: @@ -43,10 +44,12 @@ class ServerImpl final { /// \brief Start the execution service. /// \param local_context The LocalContext to be used. + /// \param remote_context The RemoteContext to be used. /// \param apis Apis to be used, only local api is actually /// needed. /// \param op_exponent Log2 threshold for operation cache. auto Run(gsl::not_null<LocalContext const*> const& local_context, + gsl::not_null<RemoteContext const*> const& remote_context, ApiBundle const& apis, std::optional<std::uint8_t> op_exponent) -> bool; diff --git a/src/buildtool/main/main.cpp b/src/buildtool/main/main.cpp index 27dd7d24..7fc4805e 100644 --- a/src/buildtool/main/main.cpp +++ b/src/buildtool/main/main.cpp @@ -827,6 +827,7 @@ auto main(int argc, char* argv[]) -> int { /*repo_config=*/nullptr}; return execution_server->Run(&local_context, + &remote_context, exec_apis, arguments.service.op_exponent) ? kExitSuccess |