about summary refs log tree commit diff
path: root/third_party/nix/src/nix-daemon
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/nix/src/nix-daemon')
-rw-r--r--third_party/nix/src/nix-daemon/nix-daemon-proto.cc14
1 files changed, 13 insertions, 1 deletions
diff --git a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
index 85adb98e9abb..33bff437600d 100644
--- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
+++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc
@@ -48,7 +48,8 @@ class WorkerServiceImpl final : public Worker::Service {
   }
 
   Status QueryValidDerivers(grpc::ServerContext* context,
-                            const StorePath* request, StorePaths* response) {
+                            const StorePath* request,
+                            StorePaths* response) override {
     const auto& path = request->path();
     store_->assertStorePath(path);
 
@@ -76,6 +77,17 @@ class WorkerServiceImpl final : public Worker::Service {
     return Status::OK;
   }
 
+  Status QueryAllValidPaths(grpc::ServerContext* context,
+                            const google::protobuf::Empty* request,
+                            StorePaths* response) override {
+    const auto paths = store_->queryAllValidPaths();
+    for (const auto& path : paths) {
+      response->add_paths(path);
+    }
+
+    return Status::OK;
+  }
+
   Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
                       nix::proto::QueryMissingResponse* response) override {
     std::set<Path> targets;