Crate iroh_fake_store

Crate iroh_fake_store 

Source
Expand description

fake iroh-blobs store for testing.

generates data on-the-fly, stores nothing. serves deterministic data (zeros or pseudo-random) at specific lengths for testing big blob transfers.

§Examples

use iroh_fake_store::FakeStore;

let store = FakeStore::builder()
    .with_blob(1024)           // 1KB blob
    .with_blob(1024 * 1024)    // 1MB blob
    .build();

let hashes = store.blobs().list().hashes().await.unwrap();
assert_eq!(hashes.len(), 2);

generates on-the-fly without storing, deterministic hashes, configurable patterns, has safety limits to prevent accidentally making huge blobs

Structs§

FakeStore
fake iroh-blobs store for testing
FakeStoreBuilder
FakeStoreConfig

Enums§

DataStrategy
data generation strategy for fake blobs