diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-20 14:16:37 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-21 10:21:29 +0100 |
commit | 37968f38e8dc07a27941c52204692c6f3254c22a (patch) | |
tree | 984c0d9d6ca417dc74d6e651aad0ea59505364a3 /src/buildtool/serve_api/remote/source_tree_client.hpp | |
parent | 5fee8034265676b903618d19a7d7d65bb8d4b023 (diff) | |
download | justbuild-37968f38e8dc07a27941c52204692c6f3254c22a.tar.gz |
just serve: Implement client-side ServeContent and extend serve API
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r-- | src/buildtool/serve_api/remote/source_tree_client.hpp | 6 |
1 files changed, 6 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 2a7f1ec2..e240a45a 100644 --- a/src/buildtool/serve_api/remote/source_tree_client.hpp +++ b/src/buildtool/serve_api/remote/source_tree_client.hpp @@ -54,6 +54,12 @@ class SourceTreeClient { std::optional<PragmaSpecial> const& resolve_symlinks, 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. + /// \returns Flag to state whether content is in remote CAS. + [[nodiscard]] auto ServeContent(std::string const& content) -> bool; + private: std::unique_ptr<justbuild::just_serve::SourceTree::Stub> stub_; Logger logger_{"RemoteSourceTreeClient"}; |