snix/tvix/store/src/chunkservice
Florian Klink 7ffb2676ee refactor(tvix/store): add read_all_and_chunk method
This moves the logic from src/import.rs that

 - reads over the contents of a file
 - chunks them up and uploads individual chunks
 - keeps track of the uploaded chunks in a BlobMeta structure
 - returns the hash of the blob and the BlobMeta structure

… into a generic read_all_and_chunk function in
src/chunkservice/util.rs.

It will work on anything implementing io::Read, not just files, which
will help us in a bit.

Change-Id: I53bf628114b73ee2e515bdae29974571ea2b6f6f
Reviewed-on: https://cl.tvl.fyi/c/depot/+/8259
Reviewed-by: tazjin <tazjin@tvl.su>
Tested-by: BuildkiteCI
Reviewed-by: raitobezarius <tvl@lahfa.xyz>
Autosubmit: flokli <flokli@flokli.de>
2023-03-13 08:46:51 +00:00
..
memory.rs refactor(tvix/store): clippy 2023-03-10 12:15:02 +00:00
mod.rs refactor(tvix/store): add read_all_and_chunk method 2023-03-13 08:46:51 +00:00
sled.rs feat(tvix/store): add new_temporary for all Sled services 2023-03-10 10:58:55 +00:00
util.rs refactor(tvix/store): add read_all_and_chunk method 2023-03-13 08:46:51 +00:00