From e440f60b6c74c6e2f406b4f187e6c20ee6d315dd Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Sat, 8 Aug 2020 16:44:50 -0400 Subject: feat(tvix): Implement all remaining RPC calls Implement all remaining RPC calls on the RpcSstore client, remove a few stub methods we had added that weren't actually present in the old RemoteStore implementation, and add one more RPC call for getBuildLog that is present in the store API, but that we hadn't added as a stub *or* to the proto. Fixes: #29 Change-Id: Id827f51a393ece4bc7bbecaf38aee9eb4b329770 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1692 Reviewed-by: kanepyork Tested-by: BuildkiteCI --- third_party/nix/src/nix-daemon/nix-daemon-proto.cc | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'third_party/nix/src/nix-daemon') 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 d5c65e197fb0..cab16e599812 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc @@ -690,6 +690,19 @@ class WorkerServiceImpl final : public WorkerService::Service { __FUNCTION__); }; + Status GetBuildLog(grpc::ServerContext* context, const StorePath* request, + proto::BuildLog* response) override { + return HandleExceptions( + [&]() -> Status { + const auto log = store_->getBuildLog(request->path()); + if (log) { + response->set_build_log(*log); + } + return Status::OK; + }, + __FUNCTION__); + } + private: Status HandleExceptions(std::function fn, absl::string_view methodName) { -- cgit 1.4.1