Commit 92c5ad5
authored
refactor: move
This moves the `downloader` module from `iroh` to `iroh-bytes`. It does
not change anything about how the downloader works or how it is used.
Expanding the featureset of the downloader and using ith for blob
downlaods in iroh will come in follow-up PRs. This mostly moves code
around, while adjusting imports and feature flags.
Included is one actual change, which allows to remove the duplication of
the "download and save to local store" logic between the
`iroh_bytes::get::db` and `iroh::downloader::get` modules:
`iroh_bytes::get::db::get_to_db` now returns an `GetError` enum instead
of `anyhow::Error`. The `GetError` enum tries to classify the potential
errors returned from `get_to_db` into realms that allow a meaningful
reaction. This is then mapped to the current `FailureAction` in the
downloader (which is insufficient in some ways still, but that will be
handled in following PRs).
## Notes & open questions
<!-- Any notes, remarks or open questions you have to make about the PR.
-->
## Change checklist
- [x] Self-review.
- [x] Documentation updates if relevant.
- [ ] Tests if relevant.downloader from iroh to iroh-bytes (#1999)1 parent 82b04e5 commit 92c5ad5
1 file changed
+3
-0
lines changedSome generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
0 commit comments