summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/remote/source_tree_client.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r--src/buildtool/serve_api/remote/source_tree_client.hpp15
1 files changed, 15 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 a76d4135..3ea1058b 100644
--- a/src/buildtool/serve_api/remote/source_tree_client.hpp
+++ b/src/buildtool/serve_api/remote/source_tree_client.hpp
@@ -78,6 +78,21 @@ class SourceTreeClient {
/// \returns Flag to state whether tree is in remote CAS.
[[nodiscard]] auto ServeTree(std::string const& tree_id) -> bool;
+ /// \brief Checks if the serve endpoint has a given tree locally available
+ /// and makes it available for a serve-orchestrated build.
+ /// \param[in] tree_id Identifier of the Git tree to look up.
+ /// \returns Flag to state whether tree is known or not, or nullopt on
+ /// errors.
+ [[nodiscard]] auto CheckRootTree(std::string const& tree_id)
+ -> std::optional<bool>;
+
+ /// \brief Retrieve tree from the CAS of the associated remote-execution
+ /// endpoint and makes it available for a serve-orchestrated build.
+ /// \param[in] tree_id Identifier of the Git tree to retrieve.
+ /// \returns Flag to state whether tree was successfully imported into the
+ /// local Git storage or not.
+ [[nodiscard]] auto GetRemoteTree(std::string const& tree_id) -> bool;
+
private:
std::unique_ptr<justbuild::just_serve::SourceTree::Stub> stub_;
Logger logger_{"RemoteSourceTreeClient"};