diff options
Diffstat (limited to 'third_party/nix/src/nix-daemon')
-rw-r--r-- | third_party/nix/src/nix-daemon/nix-daemon-proto.cc | 7 | ||||
-rw-r--r-- | third_party/nix/src/nix-daemon/nix-daemon-proto.hh | 13 |
2 files changed, 20 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 1717e6df5c90..ffd34cc60a61 100644 --- a/third_party/nix/src/nix-daemon/nix-daemon-proto.cc +++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.cc @@ -1,9 +1,12 @@ +#include "nix-daemon-proto.hh" + #include <google/protobuf/empty.pb.h> #include <google/protobuf/util/time_util.h> #include <grpcpp/impl/codegen/server_context.h> #include <grpcpp/impl/codegen/status.h> #include <grpcpp/impl/codegen/status_code_enum.h> +#include "libmain/shared.hh" #include "libproto/worker.grpc.pb.h" #include "libproto/worker.pb.h" #include "libstore/derivations.hh" @@ -283,4 +286,8 @@ class WorkerServiceImpl final : public WorkerService::Service { nix::Store* store_; }; +std::unique_ptr<WorkerService::Service> NewWorkerService(nix::Store* store) { + return std::make_unique<WorkerServiceImpl>(store); +} + } // namespace nix::daemon diff --git a/third_party/nix/src/nix-daemon/nix-daemon-proto.hh b/third_party/nix/src/nix-daemon/nix-daemon-proto.hh new file mode 100644 index 000000000000..5ffab9ebbe62 --- /dev/null +++ b/third_party/nix/src/nix-daemon/nix-daemon-proto.hh @@ -0,0 +1,13 @@ +#pragma once + +#include <memory> + +#include "libproto/worker.grpc.pb.h" +#include "libstore/store-api.hh" + +namespace nix::daemon { + +std::unique_ptr<nix::proto::WorkerService::Service> NewWorkerService( + nix::Store*); + +} // namespace nix::daemon |