Skip to content

Commit

Permalink
move some examples down to iroh-bytes (#1981)
Browse files Browse the repository at this point in the history
## Description

closes #1929 

### `provide-bytes`
This example adds either a single blob or collection to the database and
provides it. It gives instructions on how to run the fetch side of the
example for `fetch-fsm` and `fetch-stream`.

We could make this example more "advanced" by having the user provide a
path & serve the blob or collection of that content, but I wanted to
keep its simple at first.

### `fetch-fsm`
This example fetches a blob or collection using the `get` finite state
machine directly, printing the contents to the terminal.

### `fetch-stream`
This example fetches a blob or collection using a helper function to
turn the `get` finite state machine into a stream. It prints the
contents to the terminal.

## Change checklist

- [x] Self-review.
- [x] Documentation updates if relevant.
- [ ] Tests if relevant.
  • Loading branch information
ramfox authored Feb 1, 2024
1 parent 757a84d commit c7d537d
Showing 1 changed file with 18 additions and 3 deletions.
21 changes: 18 additions & 3 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c7d537d

Please sign in to comment.