mocknet

package
v0.4.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 23, 2023 License: Apache-2.0, MIT Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QueryErrorTriggerCid = cid.MustParse("bafkqaalb")

Functions

func ChanCheck

func ChanCheck(ctx context.Context, t *testing.T, ch <-chan struct{}) func() bool

Types

type MockRetrievalNet

type MockRetrievalNet struct {
	RemoteEvents []datatransfer.Event

	FinishedChan     chan struct{}
	MN               lpmock.Mocknet
	HostLocal        host.Host
	HostRemote       host.Host
	LinkSystemRemote linking.LinkSystem
	Finder           retriever.CandidateFinder
}

func NewMockRetrievalNet

func NewMockRetrievalNet() *MockRetrievalNet

func (*MockRetrievalNet) SetupNet

func (mrn *MockRetrievalNet) SetupNet(ctx context.Context, t *testing.T)

func (*MockRetrievalNet) SetupQuery

func (mrn *MockRetrievalNet) SetupQuery(ctx context.Context, t *testing.T, expectCid cid.Cid, qr retrievalmarket.QueryResponse)

func (*MockRetrievalNet) SetupRetrieval

func (mrn *MockRetrievalNet) SetupRetrieval(ctx context.Context, t *testing.T)

func (*MockRetrievalNet) TearDown

func (mrn *MockRetrievalNet) TearDown() error

func (*MockRetrievalNet) WaitForFinish

func (mrn *MockRetrievalNet) WaitForFinish(ctx context.Context, t *testing.T)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL