summaryrefslogtreecommitdiff
path: root/src/buildtool/execution_api/common/execution_api.hpp
diff options
context:
space:
mode:
authorSascha Roloff <sascha.roloff@huawei.com>2022-08-29 11:58:04 +0200
committerSascha Roloff <sascha.roloff@huawei.com>2022-09-12 17:28:57 +0200
commite51a6938e536d8bb7904d7c54eb729925fc08417 (patch)
treea2a7481b13d26330cb3d0e96063636754d8b0288 /src/buildtool/execution_api/common/execution_api.hpp
parent2dc55144e21f878b9929021e0d698736b7b67d20 (diff)
downloadjustbuild-e51a6938e536d8bb7904d7c54eb729925fc08417.tar.gz
Introduced RetrieveToCas function in IExecutionApi to synchronize artifacts between different CASes
Diffstat (limited to 'src/buildtool/execution_api/common/execution_api.hpp')
-rw-r--r--src/buildtool/execution_api/common/execution_api.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildtool/execution_api/common/execution_api.hpp b/src/buildtool/execution_api/common/execution_api.hpp
index 661ecbf3..68d4b4cb 100644
--- a/src/buildtool/execution_api/common/execution_api.hpp
+++ b/src/buildtool/execution_api/common/execution_api.hpp
@@ -61,6 +61,13 @@ class IExecutionApi {
std::vector<int> const& fds,
bool raw_tree) noexcept -> bool = 0;
+ /// \brief Synchronization of artifacts between two CASes. Retrieves
+ /// artifacts from one CAS and writes to another CAS. Tree artifacts are
+ /// resolved and its containing file artifacts are recursively retrieved.
+ [[nodiscard]] virtual auto RetrieveToCas(
+ std::vector<Artifact::ObjectInfo> const& artifacts_info,
+ gsl::not_null<IExecutionApi*> const& api) noexcept -> bool = 0;
+
/// \brief Upload blobs to CAS. Uploads only the blobs that are not yet
/// available in CAS, unless `skip_find_missing` is specified.
/// \param blobs Container of blobs to upload.