mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 01:21:21 +00:00
docs(examples): add a README to each example
Resolves #3853. Pull-Request: #3974.
This commit is contained in:
@ -18,27 +18,7 @@
|
||||
// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
//! A basic key value store demonstrating libp2p and the mDNS and Kademlia protocols.
|
||||
//!
|
||||
//! 1. Using two terminal windows, start two instances. If you local network
|
||||
//! allows mDNS, they will automatically connect.
|
||||
//!
|
||||
//! 2. Type `PUT my-key my-value` in terminal one and hit return.
|
||||
//!
|
||||
//! 3. Type `GET my-key` in terminal two and hit return.
|
||||
//!
|
||||
//! 4. Close with Ctrl-c.
|
||||
//!
|
||||
//! You can also store provider records instead of key value records.
|
||||
//!
|
||||
//! 1. Using two terminal windows, start two instances. If you local network
|
||||
//! allows mDNS, they will automatically connect.
|
||||
//!
|
||||
//! 2. Type `PUT_PROVIDER my-key` in terminal one and hit return.
|
||||
//!
|
||||
//! 3. Type `GET_PROVIDERS my-key` in terminal two and hit return.
|
||||
//!
|
||||
//! 4. Close with Ctrl-c.
|
||||
#![doc = include_str!("../README.md")]
|
||||
|
||||
use async_std::io;
|
||||
use futures::{prelude::*, select};
|
||||
|
Reference in New Issue
Block a user