feat(3p/nix/nix-daemon): Implement Worker::QuerySubstitutablePaths handler
Change-Id: I243d67b0bce29d54c7d6e08f5eee70bd395cf9a2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1234 Tested-by: BuildkiteCI Reviewed-by: Kane York <rikingcoding@gmail.com>
This commit is contained in:
parent
d36ee69061
commit
1b07e588c8
1 changed files with 17 additions and 0 deletions
|
@ -167,6 +167,23 @@ class WorkerServiceImpl final : public WorkerService::Service {
|
|||
return Status::OK;
|
||||
}
|
||||
|
||||
Status QuerySubstitutablePaths(grpc::ServerContext* context,
|
||||
const StorePaths* request,
|
||||
StorePaths* response) override {
|
||||
std::set<Path> paths;
|
||||
for (const auto& path : request->paths()) {
|
||||
paths.insert(path);
|
||||
}
|
||||
|
||||
auto res = store_->querySubstitutablePaths(paths);
|
||||
|
||||
for (const auto& path : res) {
|
||||
response->add_paths(path);
|
||||
}
|
||||
|
||||
return Status::OK;
|
||||
}
|
||||
|
||||
Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
|
||||
nix::proto::QueryMissingResponse* response) override {
|
||||
std::set<Path> targets;
|
||||
|
|
Loading…
Reference in a new issue