From 1933e4f97f1067bb50fcba2897bc0c6ec81f2632 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Thu, 16 Jul 2020 20:50:48 -0400 Subject: feat(3p/nix/nix-daemon): Implement Worker::QueryPathFromHashPart Change-Id: Id351a0c82f4d6e79a8f272674d8d8e86e12a9400 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1232 Tested-by: BuildkiteCI Reviewed-by: isomer --- third_party/nix/src/nix-daemon/nix-daemon-proto.cc | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'third_party/nix') 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 ef45fbd2a993..3c34e8bfa6c2 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc @@ -141,6 +141,15 @@ class WorkerServiceImpl final : public WorkerService::Service { return Status::OK; } + Status QueryPathFromHashPart(grpc::ServerContext* context, + const nix::proto::HashPart* request, + StorePath* response) override { + auto hash_part = request->hash_part(); + auto path = store_->queryPathFromHashPart(hash_part); + response->set_path(path); + return Status::OK; + } + Status QueryMissing(grpc::ServerContext* context, const StorePaths* request, nix::proto::QueryMissingResponse* response) override { std::set targets; -- cgit 1.4.1