From f3fdacc9b35297d605c4ee3698ed3166ee75bb03 Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Tue, 19 Dec 2023 16:33:58 +0100 Subject: serve distdir tree: Server-side implementation --- src/buildtool/serve_api/serve_service/source_tree.hpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/buildtool/serve_api/serve_service/source_tree.hpp') diff --git a/src/buildtool/serve_api/serve_service/source_tree.hpp b/src/buildtool/serve_api/serve_service/source_tree.hpp index 1204d9b7..763762f6 100644 --- a/src/buildtool/serve_api/serve_service/source_tree.hpp +++ b/src/buildtool/serve_api/serve_service/source_tree.hpp @@ -40,6 +40,8 @@ class SourceTreeService final ::justbuild::just_serve::ServeCommitTreeResponse; using ServeArchiveTreeResponse = ::justbuild::just_serve::ServeArchiveTreeResponse; + using ServeDistdirTreeResponse = + ::justbuild::just_serve::ServeDistdirTreeResponse; using ServeContentResponse = ::justbuild::just_serve::ServeContentResponse; using ServeTreeResponse = ::justbuild::just_serve::ServeTreeResponse; @@ -61,6 +63,16 @@ class SourceTreeService final const ::justbuild::just_serve::ServeArchiveTreeRequest* request, ServeArchiveTreeResponse* response) -> ::grpc::Status override; + // Compute the Git-tree identifier for the tree containing the content + // blobs of a list of distfiles. The implementation must only return the + // tree identifier if ALL content blobs are known. + // + // There are no method-specific errors. + auto ServeDistdirTree( + ::grpc::ServerContext* context, + const ::justbuild::just_serve::ServeDistdirTreeRequest* request, + ServeDistdirTreeResponse* response) -> ::grpc::Status override; + // Make the blob identifier of an archive content available in // remote CAS, if blob is known. // -- cgit v1.2.3