Module blobs

Source
Available on crate feature 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:

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:

§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§

AddDirOpts
Options for adding a directory as a collection
AddFileOpts
Options for adding a file as a blob
AddOutcome
Outcome of a blob add operation.
AddProgress
Progress stream for blob add operations.
AddReaderOpts
Options for adding a directory as a collection
Batch
A batch for write operations.
BlobInfo
Information about a complete blob.
Client
Iroh blobs client.
CollectionInfo
Information about a stored collection.
DownloadOptions
Options to configure a download request.
DownloadOutcome
Outcome of a blob download operation.
DownloadProgress
Progress stream for blob download operations.
ExportOutcome
Outcome of a blob export operation.
ExportProgress
Progress stream for blob export operations.
IncompleteBlobInfo
Information about an incomplete blob.
Reader
Data reader for a single blob.

Enums§

BlobStatus
Status information about a blob.
ReadAtLen
Defines the way to read bytes.
WrapOption
Whether to wrap the added data in a collection.

Type Aliases§

MemClient
Type alias for a memory-backed client.