diff options
author | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-17 14:00:23 +0100 |
---|---|---|
committer | Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com> | 2023-11-21 10:21:29 +0100 |
commit | 232686826d31e55e739643789b4b67aed8468016 (patch) | |
tree | 2309a0ee35a6f35626ea45ec61107c913e07a93b /src | |
parent | a3aad6ab99845d752d2686051b583e45a9b352b2 (diff) | |
download | justbuild-232686826d31e55e739643789b4b67aed8468016.tar.gz |
just_serve.proto: define ServeContent RPC
Diffstat (limited to 'src')
-rw-r--r-- | src/buildtool/serve_api/serve_service/just_serve.proto | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/buildtool/serve_api/serve_service/just_serve.proto b/src/buildtool/serve_api/serve_service/just_serve.proto index c6b805d2..dc9d0fea 100644 --- a/src/buildtool/serve_api/serve_service/just_serve.proto +++ b/src/buildtool/serve_api/serve_service/just_serve.proto @@ -128,6 +128,34 @@ message ServeArchiveTreeResponse { ServeArchiveTreeStatus status = 2; } +// A request message for +// [TargetLevelCache.ServeContent][justbuild.just_serve.TargetLevelCache.ServeContent]. +message ServeContentRequest { + // The git blob identifier of the archive. + string content = 1; +} + +// A response message for +// [TargetLevelCache.ServeContent][justbuild.just_serve.TargetLevelCache.ServeContent]. +message ServeContentResponse { + enum ServeContentStatus{ + // All good + OK = 0; + + // Content blob not known + NOT_FOUND = 1; + + // Failed to upload archive content to remote CAS + SYNC_ERROR = 2; + + // Internally, something is very broken + INTERNAL_ERROR = 3; + } + + // If the status has a code `OK`, the archive content is in the remote CAS + ServeContentStatus status = 1; +} + // Services for improved interaction with the target-level cache. service SourceTree { // Retrieve the Git-subtree identifier from a given Git commit. @@ -140,6 +168,12 @@ service SourceTree { // // There are no method-specific errors. rpc ServeArchiveTree(ServeArchiveTreeRequest) returns (ServeArchiveTreeResponse) {} + + // Make the blob identifier of an archive content available in + // remote CAS, if blob is known. + // + // There are no method-specific errors. + rpc ServeContent(ServeContentRequest) returns (ServeContentResponse) {} } message ServeTargetRequest { |