diff options
author | Griffin Smith <grfn@gws.fyi> | 2020-07-17T00·50-0400 |
---|---|---|
committer | glittershark <grfn@gws.fyi> | 2020-07-17T20·37+0000 |
commit | 1933e4f97f1067bb50fcba2897bc0c6ec81f2632 (patch) | |
tree | 8a009ea908bec8ce36e494e591d57206021cc708 /third_party | |
parent | a67db573e5b06e10deb50f08a092a911b50c7a9c (diff) |
feat(3p/nix/nix-daemon): Implement Worker::QueryPathFromHashPart r/1357
Change-Id: Id351a0c82f4d6e79a8f272674d8d8e86e12a9400 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1232 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi>
Diffstat (limited to 'third_party')
-rw-r--r-- | third_party/nix/src/nix-daemon/nix-daemon-proto.cc | 9 |
1 files changed, 9 insertions, 0 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 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<Path> targets; |