Function tvix_castore::import::fs::dir_entries_to_ingestion_stream

source ยท
pub fn dir_entries_to_ingestion_stream<'a, BS, I, P>(
    blob_service: BS,
    iter: I,
    root: &'a Path,
    reference_scanner: Option<&'a ReferenceScanner<P>>,
) -> BoxStream<'a, Result<IngestionEntry, Error>>
where BS: BlobService + Clone + 'a, I: Iterator<Item = Result<DirEntry, Error>> + Send + 'a, P: AsRef<[u8]> + Send + Sync,
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.