about summary refs log tree commit diff
path: root/third_party
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2020-07-16T22·05+0100
committertazjin <mail@tazj.in>2020-07-16T22·10+0000
commitba11727ce082fea6003007c05e51c97c81b775e7 (patch)
treeb940d38c9a31e91c307c940d629ca0136e89fad3 /third_party
parentafe99225b96cda7f1151d3455fde97e5e76a7fe7 (diff)
feat(3p/nix/proto): Add QueryMissing RPC call r/1336
Change-Id: I6a29c56a0f945afdef7434da539b4b91b2e4d2e6
Reviewed-on: https://cl.tvl.fyi/c/depot/+/1222
Reviewed-by: glittershark <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'third_party')
-rw-r--r--third_party/nix/src/proto/worker.proto13
1 files changed, 13 insertions, 0 deletions
diff --git a/third_party/nix/src/proto/worker.proto b/third_party/nix/src/proto/worker.proto
index f192478cf1ff..32df488a5d8a 100644
--- a/third_party/nix/src/proto/worker.proto
+++ b/third_party/nix/src/proto/worker.proto
@@ -100,6 +100,11 @@ service Worker {
   // Upload & add a NAR to the daemon's Nix store.
   rpc AddToStoreNar(stream AddToStoreNarRequest)
       returns (google.protobuf.Empty);
+
+  // Given a set of paths that are to be built, return the set of
+  // derivations that will be built, and the set of output paths that
+  // will be substituted.
+  rpc QueryMissing(StorePaths) returns (QueryMissingResponse);
 }
 
 enum HashType {
@@ -299,3 +304,11 @@ message AddToStoreNarRequest {
     bytes chunk = 2;
   }
 }
+
+message QueryMissingResponse {
+  repeated string will_build = 1;
+  repeated string will_substitute = 2;
+  repeated string unknown = 3;
+  uint64 download_size = 4;
+  uint64 nar_size = 5;
+}