summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/serve_api.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-03 16:40:51 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2024-01-08 17:07:35 +0100
commit1f66484fd243709653c6b51c3a879e249bd004c4 (patch)
tree10e822f8c491eaf70bacb30dfc487a63855b0668 /src/buildtool/serve_api/remote/serve_api.hpp
parentf3fdacc9b35297d605c4ee3698ed3166ee75bb03 (diff)
downloadjustbuild-1f66484fd243709653c6b51c3a879e249bd004c4.tar.gz
serve distdir tree: Client-side and API implementations
Diffstat (limited to 'src/buildtool/serve_api/remote/serve_api.hpp')
-rw-r--r--src/buildtool/serve_api/remote/serve_api.hpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/buildtool/serve_api/remote/serve_api.hpp b/src/buildtool/serve_api/remote/serve_api.hpp
index 50fdc4e3..965cf8df 100644
--- a/src/buildtool/serve_api/remote/serve_api.hpp
+++ b/src/buildtool/serve_api/remote/serve_api.hpp
@@ -58,6 +58,13 @@ class ServeApi final {
content, archive_type, subdir, resolve_symlinks, sync_tree);
}
+ [[nodiscard]] static auto RetrieveTreeFromDistdir(
+ std::shared_ptr<std::unordered_map<std::string, std::string>> const&
+ distfiles,
+ bool sync_tree = false) -> std::optional<std::string> {
+ return Instance().stc_->ServeDistdirTree(distfiles, sync_tree);
+ }
+
[[nodiscard]] static auto ContentInRemoteCAS(std::string const& content)
-> bool {
return Instance().stc_->ServeContent(content);