mockp2p

package
v0.28.16 Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2022 License: AGPL-3.0 Imports: 8 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Connector

type Connector struct {
	mock.Mock
}

Connector is an autogenerated mock type for the Connector type

func NewConnector

func NewConnector(t mockConstructorTestingTNewConnector) *Connector

NewConnector creates a new instance of Connector. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*Connector) UpdatePeers

func (_m *Connector) UpdatePeers(ctx context.Context, peerIDs peer.IDSlice)

UpdatePeers provides a mock function with given fields: ctx, peerIDs

type IDTranslator

type IDTranslator struct {
	mock.Mock
}

IDTranslator is an autogenerated mock type for the IDTranslator type

func NewIDTranslator

func NewIDTranslator(t mockConstructorTestingTNewIDTranslator) *IDTranslator

NewIDTranslator creates a new instance of IDTranslator. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*IDTranslator) GetFlowID

func (_m *IDTranslator) GetFlowID(_a0 peer.ID) (flow.Identifier, error)

GetFlowID provides a mock function with given fields: _a0

func (*IDTranslator) GetPeerID

func (_m *IDTranslator) GetPeerID(_a0 flow.Identifier) (peer.ID, error)

GetPeerID provides a mock function with given fields: _a0

type NetworkOptFunction

type NetworkOptFunction struct {
	mock.Mock
}

NetworkOptFunction is an autogenerated mock type for the NetworkOptFunction type

func NewNetworkOptFunction

func NewNetworkOptFunction(t mockConstructorTestingTNewNetworkOptFunction) *NetworkOptFunction

NewNetworkOptFunction creates a new instance of NetworkOptFunction. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*NetworkOptFunction) Execute

func (_m *NetworkOptFunction) Execute(_a0 *p2p.Network)

Execute provides a mock function with given fields: _a0

type PeerFilter

type PeerFilter struct {
	mock.Mock
}

PeerFilter is an autogenerated mock type for the PeerFilter type

func NewPeerFilter

func NewPeerFilter(t mockConstructorTestingTNewPeerFilter) *PeerFilter

NewPeerFilter creates a new instance of PeerFilter. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PeerFilter) Execute

func (_m *PeerFilter) Execute(_a0 peer.ID) error

Execute provides a mock function with given fields: _a0

type PeerManager

type PeerManager struct {
	mock.Mock
}

PeerManager is an autogenerated mock type for the PeerManager type

func NewPeerManager

func NewPeerManager(t mockConstructorTestingTNewPeerManager) *PeerManager

NewPeerManager creates a new instance of PeerManager. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PeerManager) Done

func (_m *PeerManager) Done() <-chan struct{}

Done provides a mock function with given fields:

func (*PeerManager) ForceUpdatePeers

func (_m *PeerManager) ForceUpdatePeers(_a0 context.Context)

ForceUpdatePeers provides a mock function with given fields: _a0

func (*PeerManager) Ready

func (_m *PeerManager) Ready() <-chan struct{}

Ready provides a mock function with given fields:

func (*PeerManager) RequestPeerUpdate

func (_m *PeerManager) RequestPeerUpdate()

RequestPeerUpdate provides a mock function with given fields:

func (*PeerManager) SetPeersProvider

func (_m *PeerManager) SetPeersProvider(_a0 p2p.PeersProvider)

SetPeersProvider provides a mock function with given fields: _a0

func (*PeerManager) Start

func (_m *PeerManager) Start(_a0 irrecoverable.SignalerContext)

Start provides a mock function with given fields: _a0

type PeerManagerFactoryFunc

type PeerManagerFactoryFunc struct {
	mock.Mock
}

PeerManagerFactoryFunc is an autogenerated mock type for the PeerManagerFactoryFunc type

func NewPeerManagerFactoryFunc

func NewPeerManagerFactoryFunc(t mockConstructorTestingTNewPeerManagerFactoryFunc) *PeerManagerFactoryFunc

NewPeerManagerFactoryFunc creates a new instance of PeerManagerFactoryFunc. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PeerManagerFactoryFunc) Execute

func (_m *PeerManagerFactoryFunc) Execute(_a0 host.Host, peersProvider p2p.PeersProvider, logger zerolog.Logger) (p2p.PeerManager, error)

Execute provides a mock function with given fields: _a0, peersProvider, logger

type PeersProvider

type PeersProvider struct {
	mock.Mock
}

PeersProvider is an autogenerated mock type for the PeersProvider type

func NewPeersProvider

func NewPeersProvider(t mockConstructorTestingTNewPeersProvider) *PeersProvider

NewPeersProvider creates a new instance of PeersProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*PeersProvider) Execute

func (_m *PeersProvider) Execute() peer.IDSlice

Execute provides a mock function with given fields:

type SubscriptionProvider

type SubscriptionProvider struct {
	mock.Mock
}

SubscriptionProvider is an autogenerated mock type for the SubscriptionProvider type

func NewSubscriptionProvider

func NewSubscriptionProvider(t mockConstructorTestingTNewSubscriptionProvider) *SubscriptionProvider

NewSubscriptionProvider creates a new instance of SubscriptionProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*SubscriptionProvider) GetSubscribedTopics

func (_m *SubscriptionProvider) GetSubscribedTopics(pid peer.ID) []string

GetSubscribedTopics provides a mock function with given fields: pid

type TopicProvider

type TopicProvider struct {
	mock.Mock
}

TopicProvider is an autogenerated mock type for the TopicProvider type

func NewTopicProvider

func NewTopicProvider(t mockConstructorTestingTNewTopicProvider) *TopicProvider

NewTopicProvider creates a new instance of TopicProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.

func (*TopicProvider) GetTopics

func (_m *TopicProvider) GetTopics() []string

GetTopics provides a mock function with given fields:

func (*TopicProvider) ListPeers

func (_m *TopicProvider) ListPeers(topic string) []peer.ID

ListPeers provides a mock function with given fields: topic

Jump to

Keyboard shortcuts

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