Skip to content

Commit 6ed576d

Browse files
jacobheundirkmc
authored andcommitted
Add streaming iterables guide (#459)
* docs: add streaming iterables guide placeholder * chore: move peer discovery readme to doc fold:wqer * docs: add link to async refactor issue
1 parent 35ac02d commit 6ed576d

File tree

3 files changed

+33
-1
lines changed

3 files changed

+33
-1
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ Required keys in the `options` object:
336336
> Peer has been discovered.
337337
338338
If `autoDial` is `true`, applications should **not** attempt to connect to the peer
339-
unless they are performing a specific action. See [peer discovery and auto dial](./PEER_DISCOVERY.md) for more information.
339+
unless they are performing a specific action. See [peer discovery and auto dial](./doc/PEER_DISCOVERY.md) for more information.
340340

341341
- `peer`: instance of [PeerInfo][]
342342

File renamed without changes.

doc/STREAMING_ITERABLES.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Iterable Streams
2+
3+
> This document is a guide on how to use Iterable Streams in Libp2p. As a part of the [refactor away from callbacks](https://github.com/ipfs/js-ipfs/issues/1670), we have also moved to using Iterable Streams instead of [pull-streams](https://pull-stream.github.io/). If there are missing usage guides you feel should be added, please submit a PR!
4+
5+
## Table of Contents
6+
7+
- [Iterable Streams](#iterable-streams)
8+
- [Table of Contents](#table-of-contents)
9+
- [Usage Guide](#usage-guide)
10+
- [Iterable Modules](#iterable-modules)
11+
12+
## Usage Guide
13+
14+
**Coming Soon!**
15+
16+
## Iterable Modules
17+
18+
- [it-handshake][it-handshake] Handshakes for binary protocols with iterable streams.
19+
- [it-length-prefixed][it-length-prefixed] Streaming length prefixed buffers with async iterables.
20+
- [it-pair][it-pair] Paired streams that are internally connected.
21+
- [it-pipe][it-pipe] Create a pipeline of iterables. Works with duplex streams.
22+
- [it-pushable][it-pushable] An iterable that you can push values into.
23+
- [it-reader][it-reader] Read an exact number of bytes from a binary, async iterable.
24+
- [streaming-iterables][streaming-iterables] A Swiss army knife for async iterables.
25+
26+
[it-handshake]: https://github.com/jacobheun/it-handshake
27+
[it-length-prefixed]: https://github.com/alanshaw/it-length-prefixed
28+
[it-pair]: https://github.com/alanshaw/it-pair
29+
[it-pipe]: https://github.com/alanshaw/it-pipe
30+
[it-pushable]: https://github.com/alanshaw/it-pushable
31+
[it-reader]: https://github.com/alanshaw/it-reader
32+
[streaming-iterables]: https://github.com/bustle/streaming-iterables

0 commit comments

Comments
 (0)