package
0.41.0
Repository: https://github.com/libp2p/go-libp2p.git
Documentation: pkg.go.dev

# Functions

GetPublicKey retrieves the public key associated with the given peer ID from the value store.
KeyForPublicKey returns the key used to retrieve public keys from a value store.
PublishQueryEvent publishes a query event to the query event channel associated with the given context, if any.
RegisterForQueryEvents registers a query event channel with the given context.
SubscribesToQueryEvents returns true if the context subscribes to query events.

# Constants

Adding a peer to the query.
Dialing a peer.
Found a "closest" peer (not currently used).
Got a response from a peer.
Found a provider.
Got an error when querying.
Sending a query to a peer.
Found a value.

# Variables

ErrNotFound is returned when the router fails to find the requested record.
ErrNotSupported is returned when the router doesn't support the given record type/operation.
Expired is an option that tells the routing system to return expired records when no newer records are known.
Offline is an option that tells the routing system to operate offline (i.e., rely on cached/local data only).
Number of events to buffer.

# Structs

Options is a set of routing options.
QueryEvent is emitted for every notable event that happens during a DHT query.

# Interfaces

ContentDiscovery is able to retrieve providers for a given CID using the Routing system.
ContentProviding is able to announce where to find content on the Routing system.
ContentRouting is a value provider layer of indirection.
PeerRouting is a way to find address information about certain peers.
PubKeyFetcher is an interfaces that should be implemented by value stores that can optimize retrieval of public keys.
Routing is the combination of different routing types supported by libp2p.
ValueStore is a basic Put/Get interface.

# Type aliases

Option is a single routing option.
QueryEventType indicates the query event's type.