feat(3p/nix/nix-daemon): Implement Worker::QueryDerivationOutputNames handler
Change-Id: Ie17e37322dd0e241cd35b6d8e69bd6c968fd6ff2 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1231 Tested-by: BuildkiteCI Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
eb4c8717cd
commit
a67db573e5
1 changed files with 13 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
||||||
#include <google/protobuf/util/time_util.h>
|
#include <google/protobuf/util/time_util.h>
|
||||||
|
#include <grpcpp/impl/codegen/status.h>
|
||||||
#include <grpcpp/impl/codegen/status_code_enum.h>
|
#include <grpcpp/impl/codegen/status_code_enum.h>
|
||||||
|
|
||||||
#include "libproto/worker.grpc.pb.h"
|
#include "libproto/worker.grpc.pb.h"
|
||||||
|
@ -128,6 +129,18 @@ class WorkerServiceImpl final : public WorkerService::Service {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status QueryDerivationOutputNames(
|
||||||
|
grpc::ServerContext* context, const StorePath* request,
|
||||||
|
nix::proto::DerivationOutputNames* response) override {
|
||||||
|
auto path = request->path();
|
||||||
|
auto names = store_->queryDerivationOutputNames(path);
|
||||||
|
for (const auto& name : names) {
|
||||||
|
response->add_names(name);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Status::OK;
|
||||||
|
}
|
||||||
|
|
||||||
Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
|
Status QueryMissing(grpc::ServerContext* context, const StorePaths* request,
|
||||||
nix::proto::QueryMissingResponse* response) override {
|
nix::proto::QueryMissingResponse* response) override {
|
||||||
std::set<Path> targets;
|
std::set<Path> targets;
|
||||||
|
|
Loading…
Reference in a new issue