about summary refs log tree commit diff
path: root/tvix/store/src/dummy_directory_service.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/dummy_directory_service.rs')
-rw-r--r--tvix/store/src/dummy_directory_service.rs28
1 files changed, 28 insertions, 0 deletions
diff --git a/tvix/store/src/dummy_directory_service.rs b/tvix/store/src/dummy_directory_service.rs
new file mode 100644
index 000000000000..e9b54d85afd4
--- /dev/null
+++ b/tvix/store/src/dummy_directory_service.rs
@@ -0,0 +1,28 @@
+use tokio_stream::wrappers::ReceiverStream;
+
+use crate::proto::directory_service_server::DirectoryService;
+use crate::proto::Directory;
+use crate::proto::GetDirectoryRequest;
+use crate::proto::PutDirectoryResponse;
+use tonic::{Request, Response, Result, Status, Streaming};
+
+pub struct DummyDirectoryService {}
+
+#[tonic::async_trait]
+impl DirectoryService for DummyDirectoryService {
+    type GetStream = ReceiverStream<Result<Directory>>;
+
+    async fn get(
+        &self,
+        _request: Request<GetDirectoryRequest>,
+    ) -> Result<Response<Self::GetStream>, Status> {
+        Err(Status::unimplemented("not implemented"))
+    }
+
+    async fn put(
+        &self,
+        _request: Request<Streaming<Directory>>,
+    ) -> Result<Response<PutDirectoryResponse>> {
+        Err(Status::unimplemented("not implemented"))
+    }
+}