Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitSwapNetwork ¶
type BitSwapNetwork interface { // DialPeer ensures there is a connection to peer. DialPeer(context.Context, peer.Peer) error // SendMessage sends a BitSwap message to a peer. SendMessage( context.Context, peer.Peer, bsmsg.BitSwapMessage) error // SendRequest sends a BitSwap message to a peer and waits for a response. SendRequest( context.Context, peer.Peer, bsmsg.BitSwapMessage) (incoming bsmsg.BitSwapMessage, err error) // SetDelegate registers the Reciver to handle messages received from the // network. SetDelegate(Receiver) }
BitSwapNetwork provides network connectivity for BitSwap sessions
func NewFromIpfsNetwork ¶
func NewFromIpfsNetwork(s inet.Service, dialer inet.Dialer) BitSwapNetwork
NewFromIpfsNetwork returns a BitSwapNetwork supported by underlying IPFS Dialer & Service
Click to show internal directories.
Click to hide internal directories.