mocknet

package
v0.9.3-rc1 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: Apache-2.0, MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

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

Functions

func SetupRetrieval added in v0.5.0

func SetupRetrieval(t *testing.T, remote testpeer.TestPeer) chan []datatransfer.Event

func WaitForFinish added in v0.5.0

func WaitForFinish(ctx context.Context, t *testing.T, finishChan chan []datatransfer.Event, timeout time.Duration) []datatransfer.Event

Types

type MockRetrievalNet

type MockRetrievalNet struct {
	RemoteEvents [][]datatransfer.Event
	FinishedChan []chan struct{}
	MN           lpmock.Mocknet
	Self         host.Host
	Remotes      []testpeer.TestPeer
	Finder       retriever.CandidateFinder
	// contains filtered or unexported fields
}

func NewMockRetrievalNet

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

func (*MockRetrievalNet) AddBitswapPeers added in v0.5.0

func (mrn *MockRetrievalNet) AddBitswapPeers(n int)

func (*MockRetrievalNet) AddGraphsyncPeers added in v0.5.0

func (mrn *MockRetrievalNet) AddGraphsyncPeers(n int)

func (*MockRetrievalNet) TearDown

func (mrn *MockRetrievalNet) TearDown() error

Jump to

Keyboard shortcuts

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