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 <isomer@tvl.fyi>
This commit is contained in:
Griffin Smith 2020-07-16 20:50:48 -04:00 committed by glittershark
parent a67db573e5
commit 1933e4f97f

View file

@ -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;