pub async fn fetch_metadata(
fud: &Fud,
hash: &Hash,
seeders_sub: &Subscription<Option<Vec<FudSeeder>>>,
path: &Path,
) -> Result<FudSeeder>
Expand description
Fetch a single resource metadata from seeders received from seeders_sub
.
If the resource is a file smaller than a single chunk then seeder can send the
chunk directly, and we will create the file from it on path path
.
- Wait for seeders from the subscription
- Request the metadata from the seeders
- Insert metadata to geode using the reply