From ed59ecf1491a0b6f3b933d2c4b2cd97a506f0090 Mon Sep 17 00:00:00 2001 From: Maksim Denisov Date: Tue, 21 Jan 2025 17:39:49 +0100 Subject: ServeApi: Implement DownloadTree --- src/buildtool/serve_api/remote/serve_api.hpp | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/buildtool/serve_api/remote/serve_api.hpp') diff --git a/src/buildtool/serve_api/remote/serve_api.hpp b/src/buildtool/serve_api/remote/serve_api.hpp index 975e7a17..6746fb57 100644 --- a/src/buildtool/serve_api/remote/serve_api.hpp +++ b/src/buildtool/serve_api/remote/serve_api.hpp @@ -174,6 +174,14 @@ class ServeApi final { std::filesystem::path const& git_repo) const noexcept -> expected; + /// \brief Download a git tree from serve. + /// \param tree Tree to download. + /// \return std::monostate if after the call the requested tree can be found + /// in the native CAS to which this serve instance is bound to, or an + /// unexpected error message on failure. + [[nodiscard]] auto DownloadTree(ArtifactDigest const& tree) const noexcept + -> expected; + private: // source tree service client SourceTreeClient const stc_; -- cgit v1.2.3