about summary refs log tree commit diff
path: root/tvix/store/src/dummy_blob_service.rs
diff options
context:
space:
mode:
Diffstat (limited to 'tvix/store/src/dummy_blob_service.rs')
-rw-r--r--tvix/store/src/dummy_blob_service.rs34
1 files changed, 34 insertions, 0 deletions
diff --git a/tvix/store/src/dummy_blob_service.rs b/tvix/store/src/dummy_blob_service.rs
new file mode 100644
index 000000000000..7731ea3344e3
--- /dev/null
+++ b/tvix/store/src/dummy_blob_service.rs
@@ -0,0 +1,34 @@
+use tokio_stream::wrappers::ReceiverStream;
+
+use crate::proto::blob_service_server::BlobService;
+use crate::proto::BlobChunk;
+use crate::proto::BlobMeta;
+use crate::proto::PutBlobResponse;
+use crate::proto::ReadBlobRequest;
+use crate::proto::StatBlobRequest;
+use tonic::{Request, Response, Result, Status, Streaming};
+
+pub struct DummyBlobService {}
+
+#[tonic::async_trait]
+impl BlobService for DummyBlobService {
+    type ReadStream = ReceiverStream<Result<BlobChunk>>;
+
+    async fn stat(&self, _request: Request<StatBlobRequest>) -> Result<Response<BlobMeta>> {
+        Err(Status::unimplemented("not implemented"))
+    }
+
+    async fn read(
+        &self,
+        _request: Request<ReadBlobRequest>,
+    ) -> Result<Response<Self::ReadStream>, Status> {
+        Err(Status::unimplemented("not implemented"))
+    }
+
+    async fn put(
+        &self,
+        _request: Request<Streaming<BlobChunk>>,
+    ) -> Result<Response<PutBlobResponse>> {
+        Err(Status::unimplemented("not implemented"))
+    }
+}