Crate helia_utils

Crate helia_utils 

Source
Expand description

§Helia Utils

Shared utilities and implementations for the Helia IPFS implementation.

This crate provides concrete implementations of the traits defined in helia-interface, including the main Helia struct, blockstore implementations, and utility functions.

Re-exports§

pub use blockstore::SledBlockstore;
pub use blockstore_with_bitswap::BlockstoreWithBitswap;
pub use datastore::SledDatastore;
pub use helia::DummyRouting;
pub use helia::HeliaImpl;
pub use helia::SimplePins;
pub use libp2p_behaviour::create_swarm;
pub use libp2p_behaviour::create_swarm_with_keypair;
pub use libp2p_behaviour::HeliaBehaviour;
pub use logger::TracingLogger;
pub use metrics::SimpleMetrics;

Modules§

blocks
Block storage and retrieval interfaces
blockstore
Blockstore implementations
blockstore_with_bitswap
Blockstore with Bitswap integration
datastore
Datastore implementations
errors
Error types for Helia operations
helia
Main Helia implementation
libp2p_behaviour
libp2p behavior implementation for Helia
logger
Logger implementations
metrics
Metrics implementations
pins
Pinning interface for content addressing
routing
Routing interface for peer and content discovery

Structs§

AbortOptions
Options that include an abort signal for canceling operations
AddOptions
Options for adding pins
BlockstoreConfig
Configuration for the blockstore
DatastoreConfig
Configuration for the datastore
DeleteManyOptions
Options for deleting blocks
FindPeersOptions
Options for finding peers
FindProvidersOptions
Options for finding providers
GcOptions
Garbage collection options
GetAllOptions
Options for getting all blocks
GetBlockOptions
Options for getting a block
GetManyOptions
Options for getting multiple blocks
GetOptions
Options for getting peer info
HasOptions
Options for checking if blocks exist
HeliaConfig
Configuration for creating a new Helia node
InputPair
Input pair that may not have been stored yet
IsPinnedOptions
Options for checking if content is pinned
LoggerConfig
Configuration for the logger
LsOptions
Options for listing pins
Pair
A key-value pair for block operations
PeerInfo
Information about a peer
ProgressEvent
Progress event for tracking operation status
ProgressOptions
Options for operations that support progress tracking
ProvideOptions
Options for providing content
Provider
A provider can supply content for a CID
ProviderOptions
Options for specifying content providers
PutBlockOptions
Options for putting a block
PutManyOptions
Options for putting multiple blocks
PutOptions
Options for putting records
RmOptions
Options for removing pins
RoutingOptions
Options for routing operations
RoutingRecord
A routing record

Enums§

AddPinEvents
Progress events for adding pins
AddPinProgressEvents
Combined progress events for adding pins
DeleteManyBlocksProgressEvents
Progress events for deleting blocks
GcEvent
Events emitted during garbage collection
GetAllBlocksProgressEvents
Progress events for getting all blocks
GetBlockProgressEvents
Progress events for getting a block
GetManyBlocksProgressEvents
Progress events for getting multiple blocks
HasBlockProgressEvents
Progress events for checking if a block exists
HeliaError
Main error type for Helia operations
HeliaEvent
Events emitted by a Helia node
PinMetadataValue
Valid metadata values for pins
PinType
Types of pins
ProviderInfo
Information about a content provider
PutBlockProgressEvents
Progress events for putting a single block
PutManyBlocksProgressEvents
Progress events for putting multiple blocks
TransportMethod
Methods available for content transport

Traits§

Blocks
Block storage interface
Codec
IPLD codec trait
CodecLoader
Codec loader for loading IPLD codecs
ComponentLogger
Component logger for structured logging
Datastore
Key-value datastore interface
Hasher
Multihash hasher trait
HasherLoader
Hasher loader for loading multihash hashers
Helia
Non-generic Helia trait for backward compatibility and trait objects
HeliaWithLibp2p
Generic Helia trait with libp2p type parameter for concrete implementations
Metrics
Metrics collection interface
Pins
Pinning interface
Routing
Routing interface for peer and content discovery

Type Aliases§

Await
Type alias for awaitable results
AwaitIterable
Type alias for async iterables/streams
HeliaEventReceiver
Type alias for event receiver