docs(examples): add a README to each example

Resolves #3853.

Pull-Request: #3974.
This commit is contained in:
Thomas Coratger
2023-06-01 09:40:22 +02:00
committed by GitHub
parent 87e863e8c9
commit 75edcfcdb0
26 changed files with 501 additions and 223 deletions

View File

@ -18,24 +18,8 @@
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
/// Examples for the rendezvous protocol:
///
/// 1. Run the rendezvous server:
/// ```
/// RUST_LOG=info cargo run --bin rendezvous-example
/// ```
/// 2. Register a peer:
/// ```
/// RUST_LOG=info cargo run --bin rzv-register
/// ```
/// 3. Try to discover the peer from (2):
/// ```
/// RUST_LOG=info cargo run --bin rzv-discover
/// ```
/// 4. Try to discover with identify:
/// ```
/// RUST_LOG=info cargo run --bin rzv-identify
/// ```
#![doc = include_str!("../README.md")]
use futures::StreamExt;
use libp2p::{
core::transport::upgrade::Version,