From 1f66484fd243709653c6b51c3a879e249bd004c4 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Wed, 3 Jan 2024 16:40:51 +0100 Subject: serve distdir tree: Client-side and API implementations --- src/buildtool/serve_api/remote/source_tree_client.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp') 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 const& resolve_symlinks, bool sync_tree) -> std::optional; + /// \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> const& + distfiles, + bool sync_tree) -> std::optional; + /// \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. -- cgit v1.2.3