Module iroh_blobs::rpc::client::blobs
source · rpc
only.Expand description
API for blobs management.
The main entry point is the Client
.
§Interacting with the local blob store
§Importing data
There are several ways to import data into the local blob store:
add_bytes
imports in memory data.add_stream
imports data from a stream of bytes.add_reader
imports data from an async reader.add_from_path
imports data from a file.
The last method imports data from a file on the local filesystem. This is the most efficient way to import large amounts of data.
§Exporting data
There are several ways to export data from the local blob store:
read_to_bytes
reads data into memory.read
creates a reader to read data from.export
eports data to a file on the local filesystem.
§Interacting with remote nodes
download
downloads data from a remote node. remote node.
§Interacting with the blob store itself
These are more advanced operations that are usually not needed in normal operation.
consistency_check
checks the internal consistency of the local blob store.validate
validates the locally stored data against their BLAKE3 hashes.delete_blob
deletes a blob from the local store.
§Batch operations
For complex update operations, there is a batch
API that
allows you to add multiple blobs in a single logical batch.
Operations in a batch return temporary tags that protect the added data from garbage collection as long as the batch is alive.
To store the data permanently, a temp tag needs to be upgraded to a
permanent tag using persist
or
persist_to
.
Re-exports§
pub use crate::net_protocol::DownloadMode;
Structs§
- Options for adding a directory as a collection
- Options for adding a file as a blob
- Outcome of a blob add operation.
- Progress stream for blob add operations.
- Options for adding a directory as a collection
- A batch for write operations.
- Information about a complete blob.
- Iroh blobs client.
- Information about a stored collection.
- Options to configure a download request.
- Outcome of a blob download operation.
- Progress stream for blob download operations.
- Outcome of a blob export operation.
- Progress stream for blob export operations.
- Information about an incomplete blob.
- Data reader for a single blob.
Enums§
- Status information about a blob.
- Defines the way to read bytes.
- Whether to wrap the added data in a collection.
Type Aliases§
- Type alias for a memory-backed client.