Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ProtocolGraphsync is the protocol identifier for graphsync messages ProtocolGraphsync_1_0_0 protocol.ID = "/ipfs/graphsync/1.0.0" ProtocolGraphsync_2_0_0 protocol.ID = "/ipfs/graphsync/2.0.0" )
Functions ¶
This section is empty.
Types ¶
type ConnManager ¶
ConnManager provides the methods needed to protect and unprotect connections
type GraphSyncNetwork ¶
type GraphSyncNetwork interface { // SendMessage sends a GraphSync message to a peer. SendMessage( context.Context, peer.ID, gsmsg.GraphSyncMessage) error // SetDelegate registers the Receiver to handle messages received from the // network. SetDelegate(Receiver) // ConnectTo establishes a connection to the given peer ConnectTo(context.Context, peer.ID) error NewMessageSender(context.Context, peer.ID, MessageSenderOpts) (MessageSender, error) ConnectionManager() ConnManager }
GraphSyncNetwork provides network connectivity for GraphSync.
func NewFromLibp2pHost ¶
func NewFromLibp2pHost(host host.Host, options ...Option) GraphSyncNetwork
NewFromLibp2pHost returns a GraphSyncNetwork supported by underlying Libp2p host.
type MessageSender ¶
type MessageSender interface { SendMsg(context.Context, gsmsg.GraphSyncMessage) error Close() error Reset() error }
MessageSender is an interface to send messages to a peer
type MessageSenderOpts ¶
MessageSenderOpts sets parameters for a message sender
type Option ¶
type Option func(*libp2pGraphSyncNetwork)
Option is an option for configuring the libp2p storage market network
func GraphsyncProtocols ¶
DataTransferProtocols OVERWRITES the default libp2p protocols we use for graphsync with the specified protocols
func PanicCallback ¶
func PanicCallback(callbackFn panics.CallBackFn) Option
PanicCallback allows calling code to receive information about panics that Graphsync recovers from. Graphsync recovers panics that occur during message handling in order to keep the over all system running, although they are still treated as standard errors in normal execution flow.