diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-10-24 11:21:23 +0200 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2024-10-25 13:00:43 +0200 |
commit | b98addc8f8e3e62e1213cd967f20aa631057f84e (patch) | |
tree | d4e7399fc4a02fa4e0e0684a1cdfa2bfa35673c3 /src/buildtool/serve_api/remote/source_tree_client.hpp | |
parent | 4018960c59d3fd0702c714e404ac913b2e83c3f5 (diff) | |
download | justbuild-b98addc8f8e3e62e1213cd967f20aa631057f84e.tar.gz |
serve service: Respond with digest for blob and tree checks
...to be able to interrogate remotes irrespective of protocol.
When serve endpoint is active, it will provide the correct digest
with which to interrogate the remote endpoint. Otherwise, for a
compatible remote check the file mappings for the correct digest.
The serve service proto file is updated accordingly.
Diffstat (limited to 'src/buildtool/serve_api/remote/source_tree_client.hpp')
-rw-r--r-- | src/buildtool/serve_api/remote/source_tree_client.hpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/buildtool/serve_api/remote/source_tree_client.hpp b/src/buildtool/serve_api/remote/source_tree_client.hpp index 39e0e721..15638afc 100644 --- a/src/buildtool/serve_api/remote/source_tree_client.hpp +++ b/src/buildtool/serve_api/remote/source_tree_client.hpp @@ -108,14 +108,14 @@ class SourceTreeClient { /// \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) const noexcept - -> bool; + -> expected<ArtifactDigest, GitLookupError>; /// \brief Make a given tree available in remote CAS, if known by serve /// remote. /// \param[in] tree_id Identifier of the Git tree to look up. /// \returns Flag to state whether tree is in remote CAS. [[nodiscard]] auto ServeTree(std::string const& tree_id) const noexcept - -> bool; + -> expected<ArtifactDigest, GitLookupError>; /// \brief Checks if the serve endpoint has a given tree locally available /// and makes it available for a serve-orchestrated build. |