Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PeerManager ¶
type PeerManager interface {
SenderForPeer(p peer.ID) peerresponsemanager.PeerResponseSender
}
PeerManager is an interface that returns sender interfaces for peer responses.
type QueryQueue ¶
type QueryQueue interface { PushBlock(to peer.ID, tasks ...peertask.Task) PopBlock() *peertask.TaskBlock Remove(identifier peertask.Identifier, p peer.ID) ThawRound() }
QueryQueue is an interface that can receive new selector query tasks and prioritize them as needed, and pop them off later
type ResponseManager ¶
type ResponseManager struct {
// contains filtered or unexported fields
}
ResponseManager handles incoming requests from the network, initiates selector traversals, and transmits responses
func New ¶
func New(ctx context.Context, loader ipldbridge.Loader, ipldBridge ipldbridge.IPLDBridge, peerManager PeerManager, queryQueue QueryQueue) *ResponseManager
New creates a new response manager from the given context, loader, bridge to IPLD interface, peerManager, and queryQueue.
func (*ResponseManager) ProcessRequests ¶
func (rm *ResponseManager) ProcessRequests(ctx context.Context, p peer.ID, requests []gsmsg.GraphSyncRequest)
ProcessRequests processes incoming requests for the given peer
func (*ResponseManager) RegisterHook ¶ added in v0.0.4
func (rm *ResponseManager) RegisterHook(hook graphsync.OnRequestReceivedHook)
RegisterHook registers an extension to process new incoming requests
func (*ResponseManager) Shutdown ¶
func (rm *ResponseManager) Shutdown()
Shutdown ends processing for the want manager.
func (*ResponseManager) Startup ¶
func (rm *ResponseManager) Startup()
Startup starts processing for the WantManager.