about summary refs log tree commit diff
path: root/tvix/castore/src/blobservice/mod.rs
diff options
context:
space:
mode:
authorRyan Lahfa <tvl@lahfa.xyz>2023-12-17T00·22+0100
committerclbot <clbot@tvl.fyi>2023-12-17T14·34+0000
commit0ae32d45f690eed8f259ac55b4d0d8bbc006baf2 (patch)
tree23d4b725053bf0a6bc5b41d79ce00a063c90cb38 /tvix/castore/src/blobservice/mod.rs
parent923a5737e61da020e6d7672c3aebc00db9f44850 (diff)
feat(tvix/castore): simple filesystem blob service r/7228
The simple filesystem `BlobService` enable a user to write blob store
on an existing filesystem using a prefix-style layout in the provided root directory,
e.g. the two first bytes of the blake3 hashes are used as directories prefixes.

Change-Id: I3451a688a6f39027b9c6517d853b95a87adb3a52
Reviewed-on: https://cl.tvl.fyi/c/depot/+/10071
Autosubmit: raitobezarius <tvl@lahfa.xyz>
Tested-by: BuildkiteCI
Reviewed-by: flokli <flokli@flokli.de>
Diffstat (limited to 'tvix/castore/src/blobservice/mod.rs')
-rw-r--r--tvix/castore/src/blobservice/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/tvix/castore/src/blobservice/mod.rs b/tvix/castore/src/blobservice/mod.rs
index faaf94f03746..d024121eaa39 100644
--- a/tvix/castore/src/blobservice/mod.rs
+++ b/tvix/castore/src/blobservice/mod.rs
@@ -7,6 +7,7 @@ mod from_addr;
 mod grpc;
 mod memory;
 mod naive_seeker;
+mod simplefs;
 mod sled;
 
 #[cfg(test)]
@@ -15,6 +16,7 @@ mod tests;
 pub use self::from_addr::from_addr;
 pub use self::grpc::GRPCBlobService;
 pub use self::memory::MemoryBlobService;
+pub use self::simplefs::SimpleFilesystemBlobService;
 pub use self::sled::SledBlobService;
 
 /// The base trait all BlobService services need to implement.
@@ -51,3 +53,4 @@ pub trait BlobReader: tokio::io::AsyncRead + tokio::io::AsyncSeek + Send + Unpin
 
 /// A [`io::Cursor<Vec<u8>>`] can be used as a BlobReader.
 impl BlobReader for io::Cursor<Vec<u8>> {}
+impl BlobReader for tokio::fs::File {}