|
4 | 4 | //!
|
5 | 5 | //! ## Example
|
6 | 6 | //!
|
7 |
| -//! Create a new node and add some data to the blobs store. This data will be |
8 |
| -//! available over the network. |
| 7 | +//! Create a new node. |
9 | 8 | //!
|
10 | 9 | //! ```rust
|
11 | 10 | //! # async fn run() -> anyhow::Result<()> {
|
12 |
| -//! let node = iroh::node::Node::memory().spawn().await?; |
13 |
| -//! let client = node.client(); |
14 |
| -//! let hash = client.blobs().add_bytes(b"some data".to_vec()).await?.hash; |
15 |
| -//! println!("hash: {}", hash); |
| 11 | +//! let _node = iroh::node::Node::memory().spawn().await?; |
16 | 12 | //! # Ok(())
|
17 | 13 | //! # }
|
18 | 14 | //! ```
|
|
45 | 41 | //! The client provides access to various subsystems:
|
46 | 42 | //! - [net](crate::client::net):
|
47 | 43 | //! information and control of the iroh network
|
48 |
| -//! - [blobs](crate::client::blobs): |
49 |
| -//! manage and share content-addressed blobs of data |
50 |
| -//! - [tags](crate::client::tags): |
51 |
| -//! tags to tell iroh what data is important |
52 |
| -//! - [gossip](crate::client::gossip): |
53 |
| -//! exchange data with other nodes via a gossip protocol |
54 |
| -//! - [docs](crate::client::docs): |
55 |
| -//! interact with documents and document authors |
56 | 44 | //!
|
57 | 45 | //! The subsystem clients can be obtained cheaply from the main iroh client.
|
58 | 46 | //! They are also cheaply cloneable and can be shared across threads.
|
59 | 47 | //!
|
60 | 48 | //! So if you have code that only needs to interact with one subsystem, pass
|
61 | 49 | //! it just the subsystem client.
|
62 | 50 | //!
|
63 |
| -//! ## Remote nodes |
64 |
| -//! |
65 |
| -//! To obtain a client to a remote node, you can use |
66 |
| -//! [connect](crate::client::Iroh::connect_path) to connect to a node running on |
67 |
| -//! the same machine, using the given data directory, or |
68 |
| -//! [connect_addr](crate::client::Iroh::connect_addr) to connect to a node at a |
69 |
| -//! known address. |
70 |
| -//! |
71 |
| -//! **Important**: the protocol to a remote node is not stable and will |
72 |
| -//! frequently change. So the client and server must be running the same version of iroh. |
73 | 51 | //!
|
74 | 52 | //! ## Reexports
|
75 | 53 | //!
|
76 | 54 | //! The iroh crate re-exports the following crates:
|
77 | 55 | //! - [iroh_base] as [`base`]
|
78 |
| -//! - [iroh_blobs] as [`blobs`] |
79 |
| -//! - [iroh_docs] as [`docs`] |
80 |
| -//! - [iroh_gossip] as [`gossip`] |
81 | 56 | //! - [iroh_net] as [`net`]
|
82 | 57 | //!
|
83 | 58 | //! ## Feature Flags
|
84 | 59 | //!
|
85 | 60 | //! - `metrics`: Enable metrics collection. Enabled by default.
|
86 |
| -//! - `fs-store`: Enables the disk based storage backend for `iroh-blobs`. Enabled by default. |
87 | 61 | #![cfg_attr(iroh_docsrs, feature(doc_cfg))]
|
88 | 62 | #![deny(missing_docs, rustdoc::broken_intra_doc_links)]
|
89 | 63 |
|
|
0 commit comments