Versions in this module Expand all Collapse all v0 v0.3.1 Feb 4, 2023 v0.3.0 Feb 3, 2023 Changes in this version + func VerifyCollectedEvent(t *testing.T, actual types.RetrievalEvent, expected types.RetrievalEvent) + func VerifyCollectedEventTimings(t *testing.T, events []types.RetrievalEvent) + func VerifyContainsCollectedEvent(t *testing.T, actualList []types.RetrievalEvent, expected types.RetrievalEvent) + type CollectingEventsListener struct + CollectedEvents []types.RetrievalEvent + func NewCollectingEventsListener() *CollectingEventsListener + func (el *CollectingEventsListener) Collect(event types.RetrievalEvent) + type DelayedQueryReturn struct + Delay time.Duration + Err error + QueryResponse *retrievalmarket.QueryResponse + type DelayedRetrievalReturn struct + Delay time.Duration + ResultErr error + ResultStats *types.RetrievalStats + type MockCandidateFinder struct + Candidates map[cid.Cid][]types.RetrievalCandidate + Error error + func (me *MockCandidateFinder) FindCandidates(ctx context.Context, cid cid.Cid) ([]types.RetrievalCandidate, error) + type MockClient struct + func NewMockClient(queryReturns map[string]DelayedQueryReturn, ...) *MockClient + func (mc *MockClient) GetQueryReturns() map[string]DelayedQueryReturn + func (mc *MockClient) GetReceivedLinkSystems() []ipld.LinkSystem + func (mc *MockClient) GetReceivedQueries() []peer.ID + func (mc *MockClient) GetReceivedRetrievals() []peer.ID + func (mc *MockClient) GetRetrievalReturns() map[string]DelayedRetrievalReturn + func (mc *MockClient) RetrievalQueryToPeer(ctx context.Context, minerPeer peer.AddrInfo, pcid cid.Cid, onConnected func()) (*retrievalmarket.QueryResponse, error) + func (mc *MockClient) RetrieveFromPeer(ctx context.Context, linkSystem ipld.LinkSystem, peerID peer.ID, ...) (*types.RetrievalStats, error) + func (mc *MockClient) SetQueryReturns(queryReturns map[string]DelayedQueryReturn) + func (mc *MockClient) SetRetrievalReturns(retrievalReturns map[string]DelayedRetrievalReturn)