From 58f5ff2c173b6c64e3ffb1d2cd4d840e0dcf38c3 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Wed, 28 Dec 2022 16:40:28 +0100 Subject: feat(tvix/store): initial dummy implementation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This replaces the hello world example from tvix-store with an actual gRPC endpoint, implementing all of BlobService, DirectoryService and PathInfoService. All RPC methods currently respond with the unimplemented gRPC status. Co-Authored-By: Márton Boros Change-Id: Ieba333cca44dc1e3f2ffbe676ba7a99e672b9bfb Reviewed-on: https://cl.tvl.fyi/c/depot/+/7664 Reviewed-by: tazjin Tested-by: BuildkiteCI --- tvix/store/src/dummy_path_info_service.rs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 tvix/store/src/dummy_path_info_service.rs (limited to 'tvix/store/src/dummy_path_info_service.rs') diff --git a/tvix/store/src/dummy_path_info_service.rs b/tvix/store/src/dummy_path_info_service.rs new file mode 100644 index 000000000000..3bc99ad334d9 --- /dev/null +++ b/tvix/store/src/dummy_path_info_service.rs @@ -0,0 +1,26 @@ +use crate::proto::path_info_service_server::PathInfoService; +use crate::proto::CalculateNarResponse; +use crate::proto::GetPathInfoRequest; +use crate::proto::Node; +use crate::proto::PathInfo; +use tonic::{Request, Response, Result, Status}; + +pub struct DummyPathInfoService {} + +#[tonic::async_trait] +impl PathInfoService for DummyPathInfoService { + async fn get(&self, _request: Request) -> Result> { + Err(Status::unimplemented("not implemented")) + } + + async fn put(&self, _request: Request) -> Result> { + Err(Status::unimplemented("not implemented")) + } + + async fn calculate_nar( + &self, + _request: Request, + ) -> Result> { + Err(Status::unimplemented("not implemented")) + } +} -- cgit 1.4.1