Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ProtocolBitswapNoVers is equivalent to the legacy bitswap protocol ProtocolBitswapNoVers = internal.ProtocolBitswapNoVers // ProtocolBitswapOneZero is the prefix for the legacy bitswap protocol ProtocolBitswapOneZero = internal.ProtocolBitswapOneZero // ProtocolBitswapOneOne is the prefix for version 1.1.0 ProtocolBitswapOneOne = internal.ProtocolBitswapOneOne // ProtocolBitswap is the current version of the bitswap protocol: 1.2.0 ProtocolBitswap = internal.ProtocolBitswap )
Functions ¶
func NewFromIpfsHost ¶
func NewFromIpfsHost(host host.Host, opts ...NetOpt) iface.BitSwapNetwork
NewFromIpfsHost returns a BitSwapNetwork supported by underlying IPFS host.
Types ¶
type HasContext ¶
type NetOpt ¶
type NetOpt func(*Settings)
func SupportedProtocols ¶
func WithConnectEventManager ¶ added in v0.33.1
func WithConnectEventManager(evm *network.ConnectEventManager) NetOpt
WithConnectEventManager allows to set the ConnectEventManager. Upon Start(), we will run SetListeners(). If not provided, an event manager will be created internally. This allows re-using the event manager among several Network instances.
Click to show internal directories.
Click to hide internal directories.