From b98addc8f8e3e62e1213cd967f20aa631057f84e Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Thu, 24 Oct 2024 11:21:23 +0200 Subject: 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. --- src/buildtool/serve_api/remote/serve_api.hpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (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 ee60f4f1..64e39092 100644 --- a/src/buildtool/serve_api/remote/serve_api.hpp +++ b/src/buildtool/serve_api/remote/serve_api.hpp @@ -104,13 +104,13 @@ class ServeApi final { return stc_.ServeForeignFileTree(content, name, executable); } - [[nodiscard]] auto ContentInRemoteCAS( - std::string const& content) const noexcept -> bool { + [[nodiscard]] auto ContentInRemoteCAS(std::string const& content) + const noexcept -> expected { return stc_.ServeContent(content); } - [[nodiscard]] auto TreeInRemoteCAS( - std::string const& tree_id) const noexcept -> bool { + [[nodiscard]] auto TreeInRemoteCAS(std::string const& tree_id) + const noexcept -> expected { return stc_.ServeTree(tree_id); } -- cgit v1.2.3