diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-01-03 16:40:51 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-01-08 17:07:35 +0100 |
commit | 1f66484fd243709653c6b51c3a879e249bd004c4 (patch) | |
tree | 10e822f8c491eaf70bacb30dfc487a63855b0668 /src/buildtool/serve_api/remote/source_tree_client.hpp | |
parent | f3fdacc9b35297d605c4ee3698ed3166ee75bb03 (diff) | |
download | justbuild-1f66484fd243709653c6b51c3a879e249bd004c4.tar.gz |
serve distdir tree: Client-side and API implementations
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r-- | src/buildtool/serve_api/remote/source_tree_client.hpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/buildtool/serve_api/remote/source_tree_client.hpp b/src/buildtool/serve_api/remote/source_tree_client.hpp index a9b28807..a76d4135 100644 --- a/src/buildtool/serve_api/remote/source_tree_client.hpp +++ b/src/buildtool/serve_api/remote/source_tree_client.hpp @@ -54,6 +54,18 @@ class SourceTreeClient { std::optional<PragmaSpecial> const& resolve_symlinks, bool sync_tree) -> std::optional<std::string>; + /// \brief Retrieve the Git tree of a directory of distfiles, if all the + /// content blobs are known by serve remote. + /// \param[in] distfiles Mapping from distfile names to content blob ids. + /// \param[in] sync_tree Sync tree and all ditfile blobs to the + /// remote-execution endpoint. + /// \returns The hash of the resulting tree if all distfile blobs found, + /// nullopt otherwise. + [[nodiscard]] auto ServeDistdirTree( + std::shared_ptr<std::unordered_map<std::string, std::string>> const& + distfiles, + bool sync_tree) -> std::optional<std::string>; + /// \brief Make a given content blob available in remote CAS, if known by /// serve remote. /// \param[in] content Hash of the archive content to look up. |