mocknet

package
v0.18.0 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2023 License: Apache-2.0, MIT Imports: 22 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, opts ...testpeer.PeerOption)

func (*MockRetrievalNet) AddGraphsyncPeers added in v0.5.0

func (mrn *MockRetrievalNet) AddGraphsyncPeers(n int, opts ...testpeer.PeerOption)

func (*MockRetrievalNet) AddHttpPeers added in v0.10.0

func (mrn *MockRetrievalNet) AddHttpPeers(n int, opts ...testpeer.PeerOption)

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