Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ResponseCache ¶
type ResponseCache struct {
// contains filtered or unexported fields
}
ResponseCache maintains a store of unverified blocks and response data about links for loading, and prunes blocks as needed.
func New ¶
func New(unverifiedBlockStore UnverifiedBlockStore) *ResponseCache
New initializes a new ResponseCache using the given unverified block store.
func (*ResponseCache) AttemptLoad ¶
func (rc *ResponseCache) AttemptLoad(requestID graphsync.RequestID, link ipld.Link) ([]byte, error)
AttemptLoad attempts to laod the given block from the cache
func (*ResponseCache) FinishRequest ¶
func (rc *ResponseCache) FinishRequest(requestID graphsync.RequestID)
FinishRequest indicate there is no more need to track blocks tied to this response
func (*ResponseCache) ProcessResponse ¶
func (rc *ResponseCache) ProcessResponse(responses map[graphsync.RequestID]metadata.Metadata, blks []blocks.Block)
ProcessResponse processes incoming response data, adding unverified blocks, and tracking link metadata from a remote peer
Click to show internal directories.
Click to hide internal directories.