summaryrefslogtreecommitdiff
path: root/src/buildtool/serve_api/serve_service/source_tree.hpp
diff options
context:
space:
mode:
authorPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-11-20 14:15:32 +0100
committerPaul Cristian Sarbu <paul.cristian.sarbu@huawei.com>2023-11-21 10:21:29 +0100
commit5fee8034265676b903618d19a7d7d65bb8d4b023 (patch)
tree8e18072885a63871509e5c2e5460442673d407b3 /src/buildtool/serve_api/serve_service/source_tree.hpp
parent232686826d31e55e739643789b4b67aed8468016 (diff)
downloadjustbuild-5fee8034265676b903618d19a7d7d65bb8d4b023.tar.gz
just serve: Implement server-side ServeContent RPC
Diffstat (limited to 'src/buildtool/serve_api/serve_service/source_tree.hpp')
-rw-r--r--src/buildtool/serve_api/serve_service/source_tree.hpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/buildtool/serve_api/serve_service/source_tree.hpp b/src/buildtool/serve_api/serve_service/source_tree.hpp
index 030d33ee..db64d693 100644
--- a/src/buildtool/serve_api/serve_service/source_tree.hpp
+++ b/src/buildtool/serve_api/serve_service/source_tree.hpp
@@ -41,6 +41,8 @@ class SourceTreeService final
using ServeArchiveTreeResponse =
::justbuild::just_serve::ServeArchiveTreeResponse;
+ using ServeContentResponse = ::justbuild::just_serve::ServeContentResponse;
+
// Retrieve the Git-subtree identifier from a given Git commit.
//
// There are no method-specific errors.
@@ -58,6 +60,15 @@ class SourceTreeService final
const ::justbuild::just_serve::ServeArchiveTreeRequest* request,
ServeArchiveTreeResponse* response) -> ::grpc::Status override;
+ // Make the blob identifier of an archive content available in
+ // remote CAS, if blob is known.
+ //
+ // There are no method-specific errors.
+ auto ServeContent(
+ ::grpc::ServerContext* context,
+ const ::justbuild::just_serve::ServeContentRequest* request,
+ ServeContentResponse* response) -> ::grpc::Status override;
+
private:
mutable std::shared_mutex mutex_;
std::shared_ptr<Logger> logger_{std::make_shared<Logger>("serve-service")};