Documentation
      ¶
    
    
  
    
  
    Index ¶
Constants ¶
This section is empty.
Variables ¶
      View Source
      
  
var ( // ProtocolGraphsync is the protocol identifier for graphsync messages ProtocolGraphsync protocol.ID = "/ipfs/graphsync/1.0.0" )
Functions ¶
This section is empty.
Types ¶
type ConnManager ¶ added in v0.10.0
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) (MessageSender, error)
	ConnectionManager() ConnManager
}
    GraphSyncNetwork provides network connectivity for GraphSync.
func NewFromLibp2pHost ¶
func NewFromLibp2pHost(host host.Host) 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
 Click to show internal directories. 
   Click to hide internal directories.