Function tvix_castore::import::fs::dir_entries_to_ingestion_stream

source ·
pub fn dir_entries_to_ingestion_stream<'a, BS, I>(
    blob_service: BS,
    iter: I,
    root: &'a Path
) -> BoxStream<'a, Result<IngestionEntry, Error>>
where BS: BlobService + Clone + 'a, I: Iterator<Item = Result<DirEntry, Error>> + Send + 'a,
Expand description

Converts an iterator of walkdir::DirEntrys into a stream of ingestion entries. This can then be fed into ingest_entries to ingest all the entries into the castore.

The produced stream is buffered, so uploads can happen concurrently.

The root is the [Path] in the filesystem that is being ingested into the castore.