Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type LoadAttemptQueue ¶
type LoadAttemptQueue struct {
// contains filtered or unexported fields
}
LoadAttemptQueue attempts to load using the load attempter, and then can place requests on a retry queue
func New ¶
func New(loadAttempter LoadAttempter) *LoadAttemptQueue
New initializes a new AsyncLoader from loadAttempter function
func (*LoadAttemptQueue) AttemptLoad ¶
func (laq *LoadAttemptQueue) AttemptLoad(lr LoadRequest, retry bool)
AttemptLoad attempts to loads the given load request, and if retry is true it saves the loadrequest for retrying later
func (*LoadAttemptQueue) ClearRequest ¶
func (laq *LoadAttemptQueue) ClearRequest(requestID graphsync.RequestID)
ClearRequest purges the given request from the queue of load requests to retry
func (*LoadAttemptQueue) RetryLoads ¶
func (laq *LoadAttemptQueue) RetryLoads()
RetryLoads attempts loads on all saved load requests that were loaded with retry = true
type LoadAttempter ¶
LoadAttempter attempts to load a link to an array of bytes it has three results: bytes present, error nil = success bytes nil, error present = error bytes nil, error nil = did not load, but try again later
type LoadRequest ¶
type LoadRequest struct {
// contains filtered or unexported fields
}
LoadRequest is a request to load the given link for the given request id, with results returned to the given channel
func NewLoadRequest ¶
func NewLoadRequest(requestID graphsync.RequestID, link ipld.Link, resultChan chan types.AsyncLoadResult) LoadRequest
NewLoadRequest returns a new LoadRequest for the given request id, link, and results channel