mockp2p

package
v0.30.3-fix-read-leaf-... Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2023 License: AGPL-3.0 Imports: 24 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicGossipSubRPCInspector added in v0.30.0

type BasicGossipSubRPCInspector struct {
	mock.Mock
}

BasicGossipSubRPCInspector is an autogenerated mock type for the BasicGossipSubRPCInspector type

func NewBasicGossipSubRPCInspector added in v0.30.0

func NewBasicGossipSubRPCInspector(t mockConstructorTestingTNewBasicGossipSubRPCInspector) *BasicGossipSubRPCInspector

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

func (*BasicGossipSubRPCInspector) Inspect added in v0.30.0

func (_m *BasicGossipSubRPCInspector) Inspect(_a0 peer.ID, _a1 *pubsub.RPC) error

Inspect provides a mock function with given fields: _a0, _a1

type BasicRateLimiter added in v0.30.0

type BasicRateLimiter struct {
	mock.Mock
}

BasicRateLimiter is an autogenerated mock type for the BasicRateLimiter type

func NewBasicRateLimiter added in v0.30.0

func NewBasicRateLimiter(t mockConstructorTestingTNewBasicRateLimiter) *BasicRateLimiter

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

func (*BasicRateLimiter) Allow added in v0.30.0

func (_m *BasicRateLimiter) Allow(peerID peer.ID, msgSize int) bool

Allow provides a mock function with given fields: peerID, msgSize

func (*BasicRateLimiter) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*BasicRateLimiter) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*BasicRateLimiter) Start added in v0.30.0

Start provides a mock function with given fields: _a0

type ConnectionGater added in v0.29.0

type ConnectionGater struct {
	mock.Mock
}

ConnectionGater is an autogenerated mock type for the ConnectionGater type

func NewConnectionGater added in v0.29.0

func NewConnectionGater(t mockConstructorTestingTNewConnectionGater) *ConnectionGater

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

func (*ConnectionGater) InterceptAccept added in v0.29.0

func (_m *ConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool

InterceptAccept provides a mock function with given fields: _a0

func (*ConnectionGater) InterceptAddrDial added in v0.29.0

func (_m *ConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool

InterceptAddrDial provides a mock function with given fields: _a0, _a1

func (*ConnectionGater) InterceptPeerDial added in v0.29.0

func (_m *ConnectionGater) InterceptPeerDial(p peer.ID) bool

InterceptPeerDial provides a mock function with given fields: p

func (*ConnectionGater) InterceptSecured added in v0.29.0

func (_m *ConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool

InterceptSecured provides a mock function with given fields: _a0, _a1, _a2

func (*ConnectionGater) InterceptUpgraded added in v0.29.0

func (_m *ConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason)

InterceptUpgraded provides a mock function with given fields: _a0

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 CreateNodeFunc added in v0.30.0

type CreateNodeFunc struct {
	mock.Mock
}

CreateNodeFunc is an autogenerated mock type for the CreateNodeFunc type

func NewCreateNodeFunc added in v0.30.0

func NewCreateNodeFunc(t mockConstructorTestingTNewCreateNodeFunc) *CreateNodeFunc

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

func (*CreateNodeFunc) Execute added in v0.30.0

Execute provides a mock function with given fields: _a0, _a1, _a2, _a3

type DisallowListConsumer added in v0.30.0

type DisallowListConsumer struct {
	mock.Mock
}

DisallowListConsumer is an autogenerated mock type for the DisallowListConsumer type

func NewDisallowListConsumer added in v0.30.0

func NewDisallowListConsumer(t mockConstructorTestingTNewDisallowListConsumer) *DisallowListConsumer

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

func (*DisallowListConsumer) OnNodeDisallowListUpdate added in v0.30.0

func (_m *DisallowListConsumer) OnNodeDisallowListUpdate(list flow.IdentifierList)

OnNodeDisallowListUpdate provides a mock function with given fields: list

type DisallowListNotificationConsumer added in v0.30.0

type DisallowListNotificationConsumer struct {
	mock.Mock
}

DisallowListNotificationConsumer is an autogenerated mock type for the DisallowListNotificationConsumer type

func NewDisallowListNotificationConsumer added in v0.30.0

func NewDisallowListNotificationConsumer(t mockConstructorTestingTNewDisallowListNotificationConsumer) *DisallowListNotificationConsumer

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

func (*DisallowListNotificationConsumer) OnDisallowListNotification added in v0.30.0

func (_m *DisallowListNotificationConsumer) OnDisallowListNotification(_a0 *p2p.DisallowListUpdateNotification)

OnDisallowListNotification provides a mock function with given fields: _a0

type DisallowListNotificationDistributor added in v0.30.0

type DisallowListNotificationDistributor struct {
	mock.Mock
}

DisallowListNotificationDistributor is an autogenerated mock type for the DisallowListNotificationDistributor type

func NewDisallowListNotificationDistributor added in v0.30.0

func NewDisallowListNotificationDistributor(t mockConstructorTestingTNewDisallowListNotificationDistributor) *DisallowListNotificationDistributor

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

func (*DisallowListNotificationDistributor) AddConsumer added in v0.30.0

AddConsumer provides a mock function with given fields: _a0

func (*DisallowListNotificationDistributor) DistributeBlockListNotification added in v0.30.0

func (_m *DisallowListNotificationDistributor) DistributeBlockListNotification(list flow.IdentifierList) error

DistributeBlockListNotification provides a mock function with given fields: list

func (*DisallowListNotificationDistributor) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*DisallowListNotificationDistributor) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*DisallowListNotificationDistributor) Start added in v0.30.0

Start provides a mock function with given fields: _a0

type GetTimeNow added in v0.29.0

type GetTimeNow struct {
	mock.Mock
}

GetTimeNow is an autogenerated mock type for the GetTimeNow type

func NewGetTimeNow added in v0.29.0

func NewGetTimeNow(t mockConstructorTestingTNewGetTimeNow) *GetTimeNow

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

func (*GetTimeNow) Execute added in v0.29.0

func (_m *GetTimeNow) Execute() time.Time

Execute provides a mock function with given fields:

type GossipSubAdapterConfigFunc added in v0.30.0

type GossipSubAdapterConfigFunc struct {
	mock.Mock
}

GossipSubAdapterConfigFunc is an autogenerated mock type for the GossipSubAdapterConfigFunc type

func NewGossipSubAdapterConfigFunc added in v0.30.0

func NewGossipSubAdapterConfigFunc(t mockConstructorTestingTNewGossipSubAdapterConfigFunc) *GossipSubAdapterConfigFunc

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

func (*GossipSubAdapterConfigFunc) Execute added in v0.30.0

Execute provides a mock function with given fields: _a0

type GossipSubAppSpecificRpcInspector added in v0.30.0

type GossipSubAppSpecificRpcInspector struct {
	mock.Mock
}

GossipSubAppSpecificRpcInspector is an autogenerated mock type for the GossipSubAppSpecificRpcInspector type

func NewGossipSubAppSpecificRpcInspector added in v0.30.0

func NewGossipSubAppSpecificRpcInspector(t mockConstructorTestingTNewGossipSubAppSpecificRpcInspector) *GossipSubAppSpecificRpcInspector

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

func (*GossipSubAppSpecificRpcInspector) Inspect added in v0.30.0

func (_m *GossipSubAppSpecificRpcInspector) Inspect(_a0 peer.ID, _a1 *pubsub.RPC) error

Inspect provides a mock function with given fields: _a0, _a1

type GossipSubBuilder added in v0.30.0

type GossipSubBuilder struct {
	mock.Mock
}

GossipSubBuilder is an autogenerated mock type for the GossipSubBuilder type

func NewGossipSubBuilder added in v0.30.0

func NewGossipSubBuilder(t mockConstructorTestingTNewGossipSubBuilder) *GossipSubBuilder

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

func (*GossipSubBuilder) Build added in v0.30.0

Build provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetAppSpecificScoreParams added in v0.30.0

func (_m *GossipSubBuilder) SetAppSpecificScoreParams(_a0 func(peer.ID) float64)

SetAppSpecificScoreParams provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetGossipSubConfigFunc added in v0.30.0

func (_m *GossipSubBuilder) SetGossipSubConfigFunc(_a0 p2p.GossipSubAdapterConfigFunc)

SetGossipSubConfigFunc provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetGossipSubFactory added in v0.30.0

func (_m *GossipSubBuilder) SetGossipSubFactory(_a0 p2p.GossipSubFactoryFunc)

SetGossipSubFactory provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetGossipSubPeerScoring added in v0.30.0

func (_m *GossipSubBuilder) SetGossipSubPeerScoring(_a0 bool)

SetGossipSubPeerScoring provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetGossipSubRPCInspectors added in v0.30.0

func (_m *GossipSubBuilder) SetGossipSubRPCInspectors(inspectors ...p2p.GossipSubRPCInspector)

SetGossipSubRPCInspectors provides a mock function with given fields: inspectors

func (*GossipSubBuilder) SetGossipSubScoreTracerInterval added in v0.30.0

func (_m *GossipSubBuilder) SetGossipSubScoreTracerInterval(_a0 time.Duration)

SetGossipSubScoreTracerInterval provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetGossipSubTracer added in v0.30.0

func (_m *GossipSubBuilder) SetGossipSubTracer(_a0 p2p.PubSubTracer)

SetGossipSubTracer provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetHost added in v0.30.0

func (_m *GossipSubBuilder) SetHost(_a0 host.Host)

SetHost provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetIDProvider added in v0.30.0

func (_m *GossipSubBuilder) SetIDProvider(_a0 module.IdentityProvider)

SetIDProvider provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetRoutingSystem added in v0.30.0

func (_m *GossipSubBuilder) SetRoutingSystem(_a0 routing.Routing)

SetRoutingSystem provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetSubscriptionFilter added in v0.30.0

func (_m *GossipSubBuilder) SetSubscriptionFilter(_a0 pubsub.SubscriptionFilter)

SetSubscriptionFilter provides a mock function with given fields: _a0

func (*GossipSubBuilder) SetTopicScoreParams added in v0.30.0

func (_m *GossipSubBuilder) SetTopicScoreParams(topic channels.Topic, topicScoreParams *pubsub.TopicScoreParams)

SetTopicScoreParams provides a mock function with given fields: topic, topicScoreParams

type GossipSubControlMetricsObserver added in v0.30.0

type GossipSubControlMetricsObserver struct {
	mock.Mock
}

GossipSubControlMetricsObserver is an autogenerated mock type for the GossipSubControlMetricsObserver type

func NewGossipSubControlMetricsObserver added in v0.30.0

func NewGossipSubControlMetricsObserver(t mockConstructorTestingTNewGossipSubControlMetricsObserver) *GossipSubControlMetricsObserver

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

func (*GossipSubControlMetricsObserver) ObserveRPC added in v0.30.0

func (_m *GossipSubControlMetricsObserver) ObserveRPC(_a0 peer.ID, _a1 *pubsub.RPC)

ObserveRPC provides a mock function with given fields: _a0, _a1

type GossipSubFactoryFunc added in v0.30.0

type GossipSubFactoryFunc struct {
	mock.Mock
}

GossipSubFactoryFunc is an autogenerated mock type for the GossipSubFactoryFunc type

func NewGossipSubFactoryFunc added in v0.30.0

func NewGossipSubFactoryFunc(t mockConstructorTestingTNewGossipSubFactoryFunc) *GossipSubFactoryFunc

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

func (*GossipSubFactoryFunc) Execute added in v0.30.0

Execute provides a mock function with given fields: _a0, _a1, _a2, _a3

type GossipSubInspectorNotificationDistributor added in v0.30.0

type GossipSubInspectorNotificationDistributor struct {
	mock.Mock
}

GossipSubInspectorNotificationDistributor is an autogenerated mock type for the GossipSubInspectorNotificationDistributor type

func NewGossipSubInspectorNotificationDistributor added in v0.30.0

func NewGossipSubInspectorNotificationDistributor(t mockConstructorTestingTNewGossipSubInspectorNotificationDistributor) *GossipSubInspectorNotificationDistributor

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

func (*GossipSubInspectorNotificationDistributor) AddConsumer added in v0.30.0

AddConsumer provides a mock function with given fields: _a0

func (*GossipSubInspectorNotificationDistributor) DistributeInvalidControlMessageNotification added in v0.30.0

func (_m *GossipSubInspectorNotificationDistributor) DistributeInvalidControlMessageNotification(notification *p2p.InvalidControlMessageNotification) error

DistributeInvalidControlMessageNotification provides a mock function with given fields: notification

func (*GossipSubInspectorNotificationDistributor) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*GossipSubInspectorNotificationDistributor) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*GossipSubInspectorNotificationDistributor) Start added in v0.30.0

Start provides a mock function with given fields: _a0

type GossipSubInvalidControlMessageNotificationConsumer added in v0.30.0

type GossipSubInvalidControlMessageNotificationConsumer struct {
	mock.Mock
}

GossipSubInvalidControlMessageNotificationConsumer is an autogenerated mock type for the GossipSubInvalidControlMessageNotificationConsumer type

func NewGossipSubInvalidControlMessageNotificationConsumer added in v0.30.0

func NewGossipSubInvalidControlMessageNotificationConsumer(t mockConstructorTestingTNewGossipSubInvalidControlMessageNotificationConsumer) *GossipSubInvalidControlMessageNotificationConsumer

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

func (*GossipSubInvalidControlMessageNotificationConsumer) OnInvalidControlMessageNotification added in v0.30.0

OnInvalidControlMessageNotification provides a mock function with given fields: _a0

type GossipSubRPCInspector added in v0.30.0

type GossipSubRPCInspector struct {
	mock.Mock
}

GossipSubRPCInspector is an autogenerated mock type for the GossipSubRPCInspector type

func NewGossipSubRPCInspector added in v0.30.0

func NewGossipSubRPCInspector(t mockConstructorTestingTNewGossipSubRPCInspector) *GossipSubRPCInspector

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

func (*GossipSubRPCInspector) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*GossipSubRPCInspector) Inspect added in v0.30.0

func (_m *GossipSubRPCInspector) Inspect(_a0 peer.ID, _a1 *pubsub.RPC) error

Inspect provides a mock function with given fields: _a0, _a1

func (*GossipSubRPCInspector) Name added in v0.30.0

func (_m *GossipSubRPCInspector) Name() string

Name provides a mock function with given fields:

func (*GossipSubRPCInspector) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*GossipSubRPCInspector) Start added in v0.30.0

Start provides a mock function with given fields: _a0

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 LibP2PFactoryFunc added in v0.30.0

type LibP2PFactoryFunc struct {
	mock.Mock
}

LibP2PFactoryFunc is an autogenerated mock type for the LibP2PFactoryFunc type

func NewLibP2PFactoryFunc added in v0.30.0

func NewLibP2PFactoryFunc(t mockConstructorTestingTNewLibP2PFactoryFunc) *LibP2PFactoryFunc

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

func (*LibP2PFactoryFunc) Execute added in v0.30.0

func (_m *LibP2PFactoryFunc) Execute() (p2p.LibP2PNode, error)

Execute provides a mock function with given fields:

type LibP2PNode added in v0.29.0

type LibP2PNode struct {
	mock.Mock
}

LibP2PNode is an autogenerated mock type for the LibP2PNode type

func NewLibP2PNode added in v0.29.0

func NewLibP2PNode(t mockConstructorTestingTNewLibP2PNode) *LibP2PNode

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

func (*LibP2PNode) AddPeer added in v0.29.0

func (_m *LibP2PNode) AddPeer(ctx context.Context, peerInfo peer.AddrInfo) error

AddPeer provides a mock function with given fields: ctx, peerInfo

func (*LibP2PNode) CreateStream added in v0.29.0

func (_m *LibP2PNode) CreateStream(ctx context.Context, peerID peer.ID) (network.Stream, error)

CreateStream provides a mock function with given fields: ctx, peerID

func (*LibP2PNode) Done added in v0.29.0

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

Done provides a mock function with given fields:

func (*LibP2PNode) GetIPPort added in v0.29.0

func (_m *LibP2PNode) GetIPPort() (string, string, error)

GetIPPort provides a mock function with given fields:

func (*LibP2PNode) GetPeersForProtocol added in v0.29.0

func (_m *LibP2PNode) GetPeersForProtocol(pid protocol.ID) peer.IDSlice

GetPeersForProtocol provides a mock function with given fields: pid

func (*LibP2PNode) HasSubscription added in v0.29.0

func (_m *LibP2PNode) HasSubscription(topic channels.Topic) bool

HasSubscription provides a mock function with given fields: topic

func (*LibP2PNode) Host added in v0.29.0

func (_m *LibP2PNode) Host() host.Host

Host provides a mock function with given fields:

func (*LibP2PNode) IsConnected added in v0.29.0

func (_m *LibP2PNode) IsConnected(peerID peer.ID) (bool, error)

IsConnected provides a mock function with given fields: peerID

func (*LibP2PNode) ListPeers added in v0.29.0

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

ListPeers provides a mock function with given fields: topic

func (*LibP2PNode) PeerManagerComponent added in v0.29.0

func (_m *LibP2PNode) PeerManagerComponent() component.Component

PeerManagerComponent provides a mock function with given fields:

func (*LibP2PNode) PeerScoreExposer added in v0.30.0

func (_m *LibP2PNode) PeerScoreExposer() (p2p.PeerScoreExposer, bool)

PeerScoreExposer provides a mock function with given fields:

func (*LibP2PNode) Publish added in v0.29.0

func (_m *LibP2PNode) Publish(ctx context.Context, topic channels.Topic, data []byte) error

Publish provides a mock function with given fields: ctx, topic, data

func (*LibP2PNode) Ready added in v0.29.0

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

Ready provides a mock function with given fields:

func (*LibP2PNode) RemovePeer added in v0.29.0

func (_m *LibP2PNode) RemovePeer(peerID peer.ID) error

RemovePeer provides a mock function with given fields: peerID

func (*LibP2PNode) RequestPeerUpdate added in v0.29.0

func (_m *LibP2PNode) RequestPeerUpdate()

RequestPeerUpdate provides a mock function with given fields:

func (*LibP2PNode) Routing added in v0.29.0

func (_m *LibP2PNode) Routing() routing.Routing

Routing provides a mock function with given fields:

func (*LibP2PNode) RoutingTable added in v0.29.0

func (_m *LibP2PNode) RoutingTable() *kbucket.RoutingTable

RoutingTable provides a mock function with given fields:

func (*LibP2PNode) SetComponentManager added in v0.29.0

func (_m *LibP2PNode) SetComponentManager(cm *component.ComponentManager)

SetComponentManager provides a mock function with given fields: cm

func (*LibP2PNode) SetPeerScoreExposer added in v0.30.0

func (_m *LibP2PNode) SetPeerScoreExposer(e p2p.PeerScoreExposer)

SetPeerScoreExposer provides a mock function with given fields: e

func (*LibP2PNode) SetPubSub added in v0.29.0

func (_m *LibP2PNode) SetPubSub(ps p2p.PubSubAdapter)

SetPubSub provides a mock function with given fields: ps

func (*LibP2PNode) SetRouting added in v0.29.0

func (_m *LibP2PNode) SetRouting(r routing.Routing)

SetRouting provides a mock function with given fields: r

func (*LibP2PNode) SetUnicastManager added in v0.30.0

func (_m *LibP2PNode) SetUnicastManager(uniMgr p2p.UnicastManager)

SetUnicastManager provides a mock function with given fields: uniMgr

func (*LibP2PNode) Start added in v0.29.0

func (_m *LibP2PNode) Start(ctx irrecoverable.SignalerContext)

Start provides a mock function with given fields: ctx

func (*LibP2PNode) Stop added in v0.29.0

func (_m *LibP2PNode) Stop() error

Stop provides a mock function with given fields:

func (*LibP2PNode) Subscribe added in v0.29.0

func (_m *LibP2PNode) Subscribe(topic channels.Topic, topicValidator p2p.TopicValidatorFunc) (p2p.Subscription, error)

Subscribe provides a mock function with given fields: topic, topicValidator

func (*LibP2PNode) UnSubscribe added in v0.29.0

func (_m *LibP2PNode) UnSubscribe(topic channels.Topic) error

UnSubscribe provides a mock function with given fields: topic

func (*LibP2PNode) WithDefaultUnicastProtocol added in v0.29.0

func (_m *LibP2PNode) WithDefaultUnicastProtocol(defaultHandler network.StreamHandler, preferred []protocols.ProtocolName) error

WithDefaultUnicastProtocol provides a mock function with given fields: defaultHandler, preferred

func (*LibP2PNode) WithPeersProvider added in v0.29.0

func (_m *LibP2PNode) WithPeersProvider(peersProvider p2p.PeersProvider)

WithPeersProvider provides a mock function with given fields: peersProvider

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 NodeBlockListConsumer added in v0.30.0

type NodeBlockListConsumer struct {
	mock.Mock
}

NodeBlockListConsumer is an autogenerated mock type for the NodeBlockListConsumer type

func NewNodeBlockListConsumer added in v0.30.0

func NewNodeBlockListConsumer(t mockConstructorTestingTNewNodeBlockListConsumer) *NodeBlockListConsumer

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

func (*NodeBlockListConsumer) OnNodeDisallowListUpdate added in v0.30.0

func (_m *NodeBlockListConsumer) OnNodeDisallowListUpdate(list flow.IdentifierList)

OnNodeBlockListUpdate provides a mock function with given fields: list

type NodeBuilder added in v0.30.0

type NodeBuilder struct {
	mock.Mock
}

NodeBuilder is an autogenerated mock type for the NodeBuilder type

func NewNodeBuilder added in v0.30.0

func NewNodeBuilder(t mockConstructorTestingTNewNodeBuilder) *NodeBuilder

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

func (*NodeBuilder) Build added in v0.30.0

func (_m *NodeBuilder) Build() (p2p.LibP2PNode, error)

Build provides a mock function with given fields:

func (*NodeBuilder) EnableGossipSubPeerScoring added in v0.30.0

func (_m *NodeBuilder) EnableGossipSubPeerScoring(_a0 module.IdentityProvider, _a1 *p2p.PeerScoringConfig) p2p.NodeBuilder

EnableGossipSubPeerScoring provides a mock function with given fields: _a0, _a1

func (*NodeBuilder) SetBasicResolver added in v0.30.0

func (_m *NodeBuilder) SetBasicResolver(_a0 madns.BasicResolver) p2p.NodeBuilder

SetBasicResolver provides a mock function with given fields: _a0

func (*NodeBuilder) SetConnectionGater added in v0.30.0

func (_m *NodeBuilder) SetConnectionGater(_a0 connmgr.ConnectionGater) p2p.NodeBuilder

SetConnectionGater provides a mock function with given fields: _a0

func (*NodeBuilder) SetConnectionManager added in v0.30.0

func (_m *NodeBuilder) SetConnectionManager(_a0 connmgr.ConnManager) p2p.NodeBuilder

SetConnectionManager provides a mock function with given fields: _a0

func (*NodeBuilder) SetCreateNode added in v0.30.0

func (_m *NodeBuilder) SetCreateNode(_a0 p2p.CreateNodeFunc) p2p.NodeBuilder

SetCreateNode provides a mock function with given fields: _a0

func (*NodeBuilder) SetGossipSubFactory added in v0.30.0

SetGossipSubFactory provides a mock function with given fields: _a0, _a1

func (*NodeBuilder) SetGossipSubRPCInspectors added in v0.30.0

func (_m *NodeBuilder) SetGossipSubRPCInspectors(inspectors ...p2p.GossipSubRPCInspector) p2p.NodeBuilder

SetGossipSubRPCInspectors provides a mock function with given fields: inspectors

func (*NodeBuilder) SetGossipSubScoreTracerInterval added in v0.30.0

func (_m *NodeBuilder) SetGossipSubScoreTracerInterval(_a0 time.Duration) p2p.NodeBuilder

SetGossipSubScoreTracerInterval provides a mock function with given fields: _a0

func (*NodeBuilder) SetGossipSubTracer added in v0.30.0

func (_m *NodeBuilder) SetGossipSubTracer(_a0 p2p.PubSubTracer) p2p.NodeBuilder

SetGossipSubTracer provides a mock function with given fields: _a0

func (*NodeBuilder) SetPeerManagerOptions added in v0.30.0

func (_m *NodeBuilder) SetPeerManagerOptions(_a0 bool, _a1 time.Duration) p2p.NodeBuilder

SetPeerManagerOptions provides a mock function with given fields: _a0, _a1

func (*NodeBuilder) SetRateLimiterDistributor added in v0.30.0

func (_m *NodeBuilder) SetRateLimiterDistributor(_a0 p2p.UnicastRateLimiterDistributor) p2p.NodeBuilder

SetRateLimiterDistributor provides a mock function with given fields: _a0

func (*NodeBuilder) SetResourceManager added in v0.30.0

func (_m *NodeBuilder) SetResourceManager(_a0 network.ResourceManager) p2p.NodeBuilder

SetResourceManager provides a mock function with given fields: _a0

func (*NodeBuilder) SetRoutingSystem added in v0.30.0

func (_m *NodeBuilder) SetRoutingSystem(_a0 func(context.Context, host.Host) (routing.Routing, error)) p2p.NodeBuilder

SetRoutingSystem provides a mock function with given fields: _a0

func (*NodeBuilder) SetStreamCreationRetryInterval added in v0.30.0

func (_m *NodeBuilder) SetStreamCreationRetryInterval(_a0 time.Duration) p2p.NodeBuilder

SetStreamCreationRetryInterval provides a mock function with given fields: _a0

func (*NodeBuilder) SetSubscriptionFilter added in v0.30.0

func (_m *NodeBuilder) SetSubscriptionFilter(_a0 pubsub.SubscriptionFilter) p2p.NodeBuilder

SetSubscriptionFilter provides a mock function with given fields: _a0

type PeerConnections added in v0.30.0

type PeerConnections struct {
	mock.Mock
}

PeerConnections is an autogenerated mock type for the PeerConnections type

func NewPeerConnections added in v0.30.0

func NewPeerConnections(t mockConstructorTestingTNewPeerConnections) *PeerConnections

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

func (*PeerConnections) IsConnected added in v0.30.0

func (_m *PeerConnections) IsConnected(peerID peer.ID) (bool, error)

IsConnected provides a mock function with given fields: peerID

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) OnRateLimitedPeer added in v0.30.0

func (_m *PeerManager) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string)

OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason

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 PeerScore added in v0.30.0

type PeerScore struct {
	mock.Mock
}

PeerScore is an autogenerated mock type for the PeerScore type

func NewPeerScore added in v0.30.0

func NewPeerScore(t mockConstructorTestingTNewPeerScore) *PeerScore

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

func (*PeerScore) PeerScoreExposer added in v0.30.0

func (_m *PeerScore) PeerScoreExposer() (p2p.PeerScoreExposer, bool)

PeerScoreExposer provides a mock function with given fields:

func (*PeerScore) SetPeerScoreExposer added in v0.30.0

func (_m *PeerScore) SetPeerScoreExposer(e p2p.PeerScoreExposer)

SetPeerScoreExposer provides a mock function with given fields: e

type PeerScoreExposer added in v0.30.0

type PeerScoreExposer struct {
	mock.Mock
}

PeerScoreExposer is an autogenerated mock type for the PeerScoreExposer type

func NewPeerScoreExposer added in v0.30.0

func NewPeerScoreExposer(t mockConstructorTestingTNewPeerScoreExposer) *PeerScoreExposer

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

func (*PeerScoreExposer) GetAppScore added in v0.30.0

func (_m *PeerScoreExposer) GetAppScore(peerID peer.ID) (float64, bool)

GetAppScore provides a mock function with given fields: peerID

func (*PeerScoreExposer) GetBehaviourPenalty added in v0.30.0

func (_m *PeerScoreExposer) GetBehaviourPenalty(peerID peer.ID) (float64, bool)

GetBehaviourPenalty provides a mock function with given fields: peerID

func (*PeerScoreExposer) GetIPColocationFactor added in v0.30.0

func (_m *PeerScoreExposer) GetIPColocationFactor(peerID peer.ID) (float64, bool)

GetIPColocationFactor provides a mock function with given fields: peerID

func (*PeerScoreExposer) GetScore added in v0.30.0

func (_m *PeerScoreExposer) GetScore(peerID peer.ID) (float64, bool)

GetScore provides a mock function with given fields: peerID

func (*PeerScoreExposer) GetTopicScores added in v0.30.0

func (_m *PeerScoreExposer) GetTopicScores(peerID peer.ID) (map[string]p2p.TopicScoreSnapshot, bool)

GetTopicScores provides a mock function with given fields: peerID

type PeerScoreTracer added in v0.30.0

type PeerScoreTracer struct {
	mock.Mock
}

PeerScoreTracer is an autogenerated mock type for the PeerScoreTracer type

func NewPeerScoreTracer added in v0.30.0

func NewPeerScoreTracer(t mockConstructorTestingTNewPeerScoreTracer) *PeerScoreTracer

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

func (*PeerScoreTracer) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*PeerScoreTracer) GetAppScore added in v0.30.0

func (_m *PeerScoreTracer) GetAppScore(peerID peer.ID) (float64, bool)

GetAppScore provides a mock function with given fields: peerID

func (*PeerScoreTracer) GetBehaviourPenalty added in v0.30.0

func (_m *PeerScoreTracer) GetBehaviourPenalty(peerID peer.ID) (float64, bool)

GetBehaviourPenalty provides a mock function with given fields: peerID

func (*PeerScoreTracer) GetIPColocationFactor added in v0.30.0

func (_m *PeerScoreTracer) GetIPColocationFactor(peerID peer.ID) (float64, bool)

GetIPColocationFactor provides a mock function with given fields: peerID

func (*PeerScoreTracer) GetScore added in v0.30.0

func (_m *PeerScoreTracer) GetScore(peerID peer.ID) (float64, bool)

GetScore provides a mock function with given fields: peerID

func (*PeerScoreTracer) GetTopicScores added in v0.30.0

func (_m *PeerScoreTracer) GetTopicScores(peerID peer.ID) (map[string]p2p.TopicScoreSnapshot, bool)

GetTopicScores provides a mock function with given fields: peerID

func (*PeerScoreTracer) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*PeerScoreTracer) Start added in v0.30.0

Start provides a mock function with given fields: _a0

func (*PeerScoreTracer) UpdateInterval added in v0.30.0

func (_m *PeerScoreTracer) UpdateInterval() time.Duration

UpdateInterval provides a mock function with given fields:

func (*PeerScoreTracer) UpdatePeerScoreSnapshots added in v0.30.0

func (_m *PeerScoreTracer) UpdatePeerScoreSnapshots(_a0 map[peer.ID]*p2p.PeerScoreSnapshot)

UpdatePeerScoreSnapshots provides a mock function with given fields: _a0

type PeerScoringBuilder added in v0.30.0

type PeerScoringBuilder struct {
	mock.Mock
}

PeerScoringBuilder is an autogenerated mock type for the PeerScoringBuilder type

func NewPeerScoringBuilder added in v0.30.0

func NewPeerScoringBuilder(t mockConstructorTestingTNewPeerScoringBuilder) *PeerScoringBuilder

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

func (*PeerScoringBuilder) SetAppSpecificScoreParams added in v0.30.0

func (_m *PeerScoringBuilder) SetAppSpecificScoreParams(_a0 func(peer.ID) float64)

SetAppSpecificScoreParams provides a mock function with given fields: _a0

func (*PeerScoringBuilder) SetTopicScoreParams added in v0.30.0

func (_m *PeerScoringBuilder) SetTopicScoreParams(topic channels.Topic, topicScoreParams *pubsub.TopicScoreParams)

SetTopicScoreParams provides a mock function with given fields: topic, topicScoreParams

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 ProtocolPeerCache added in v0.30.0

type ProtocolPeerCache struct {
	mock.Mock
}

ProtocolPeerCache is an autogenerated mock type for the ProtocolPeerCache type

func NewProtocolPeerCache added in v0.30.0

func NewProtocolPeerCache(t mockConstructorTestingTNewProtocolPeerCache) *ProtocolPeerCache

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

func (*ProtocolPeerCache) AddProtocols added in v0.30.0

func (_m *ProtocolPeerCache) AddProtocols(peerID peer.ID, protocols []protocol.ID)

AddProtocols provides a mock function with given fields: peerID, protocols

func (*ProtocolPeerCache) GetPeers added in v0.30.0

func (_m *ProtocolPeerCache) GetPeers(pid protocol.ID) map[peer.ID]struct{}

GetPeers provides a mock function with given fields: pid

func (*ProtocolPeerCache) RemovePeer added in v0.30.0

func (_m *ProtocolPeerCache) RemovePeer(peerID peer.ID)

RemovePeer provides a mock function with given fields: peerID

func (*ProtocolPeerCache) RemoveProtocols added in v0.30.0

func (_m *ProtocolPeerCache) RemoveProtocols(peerID peer.ID, protocols []protocol.ID)

RemoveProtocols provides a mock function with given fields: peerID, protocols

type PubSubAdapter added in v0.29.0

type PubSubAdapter struct {
	mock.Mock
}

PubSubAdapter is an autogenerated mock type for the PubSubAdapter type

func NewPubSubAdapter added in v0.29.0

func NewPubSubAdapter(t mockConstructorTestingTNewPubSubAdapter) *PubSubAdapter

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

func (*PubSubAdapter) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*PubSubAdapter) GetTopics added in v0.29.0

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

GetTopics provides a mock function with given fields:

func (*PubSubAdapter) Join added in v0.29.0

func (_m *PubSubAdapter) Join(topic string) (p2p.Topic, error)

Join provides a mock function with given fields: topic

func (*PubSubAdapter) ListPeers added in v0.29.0

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

ListPeers provides a mock function with given fields: topic

func (*PubSubAdapter) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*PubSubAdapter) RegisterTopicValidator added in v0.29.0

func (_m *PubSubAdapter) RegisterTopicValidator(topic string, topicValidator p2p.TopicValidatorFunc) error

RegisterTopicValidator provides a mock function with given fields: topic, topicValidator

func (*PubSubAdapter) Start added in v0.30.0

Start provides a mock function with given fields: _a0

func (*PubSubAdapter) UnregisterTopicValidator added in v0.29.0

func (_m *PubSubAdapter) UnregisterTopicValidator(topic string) error

UnregisterTopicValidator provides a mock function with given fields: topic

type PubSubAdapterConfig added in v0.29.0

type PubSubAdapterConfig struct {
	mock.Mock
}

PubSubAdapterConfig is an autogenerated mock type for the PubSubAdapterConfig type

func NewPubSubAdapterConfig added in v0.29.0

func NewPubSubAdapterConfig(t mockConstructorTestingTNewPubSubAdapterConfig) *PubSubAdapterConfig

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

func (*PubSubAdapterConfig) WithAppSpecificRpcInspectors added in v0.30.0

func (_m *PubSubAdapterConfig) WithAppSpecificRpcInspectors(_a0 ...p2p.GossipSubRPCInspector)

WithAppSpecificRpcInspectors provides a mock function with given fields: _a0

func (*PubSubAdapterConfig) WithMessageIdFunction added in v0.29.0

func (_m *PubSubAdapterConfig) WithMessageIdFunction(f func([]byte) string)

WithMessageIdFunction provides a mock function with given fields: f

func (*PubSubAdapterConfig) WithRoutingDiscovery added in v0.29.0

func (_m *PubSubAdapterConfig) WithRoutingDiscovery(_a0 routing.ContentRouting)

WithRoutingDiscovery provides a mock function with given fields: _a0

func (*PubSubAdapterConfig) WithScoreOption added in v0.29.0

func (_m *PubSubAdapterConfig) WithScoreOption(_a0 p2p.ScoreOptionBuilder)

WithScoreOption provides a mock function with given fields: _a0

func (*PubSubAdapterConfig) WithScoreTracer added in v0.30.0

func (_m *PubSubAdapterConfig) WithScoreTracer(tracer p2p.PeerScoreTracer)

WithScoreTracer provides a mock function with given fields: tracer

func (*PubSubAdapterConfig) WithSubscriptionFilter added in v0.29.0

func (_m *PubSubAdapterConfig) WithSubscriptionFilter(_a0 p2p.SubscriptionFilter)

WithSubscriptionFilter provides a mock function with given fields: _a0

func (*PubSubAdapterConfig) WithTracer added in v0.30.0

func (_m *PubSubAdapterConfig) WithTracer(t p2p.PubSubTracer)

WithTracer provides a mock function with given fields: t

type PubSubTracer added in v0.30.0

type PubSubTracer struct {
	mock.Mock
}

PubSubTracer is an autogenerated mock type for the PubSubTracer type

func NewPubSubTracer added in v0.30.0

func NewPubSubTracer(t mockConstructorTestingTNewPubSubTracer) *PubSubTracer

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

func (*PubSubTracer) AddPeer added in v0.30.0

func (_m *PubSubTracer) AddPeer(p peer.ID, proto protocol.ID)

AddPeer provides a mock function with given fields: p, proto

func (*PubSubTracer) DeliverMessage added in v0.30.0

func (_m *PubSubTracer) DeliverMessage(msg *pubsub.Message)

DeliverMessage provides a mock function with given fields: msg

func (*PubSubTracer) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*PubSubTracer) DropRPC added in v0.30.0

func (_m *PubSubTracer) DropRPC(rpc *pubsub.RPC, p peer.ID)

DropRPC provides a mock function with given fields: rpc, p

func (*PubSubTracer) DuplicateMessage added in v0.30.0

func (_m *PubSubTracer) DuplicateMessage(msg *pubsub.Message)

DuplicateMessage provides a mock function with given fields: msg

func (*PubSubTracer) Graft added in v0.30.0

func (_m *PubSubTracer) Graft(p peer.ID, topic string)

Graft provides a mock function with given fields: p, topic

func (*PubSubTracer) Join added in v0.30.0

func (_m *PubSubTracer) Join(topic string)

Join provides a mock function with given fields: topic

func (*PubSubTracer) Leave added in v0.30.0

func (_m *PubSubTracer) Leave(topic string)

Leave provides a mock function with given fields: topic

func (*PubSubTracer) Prune added in v0.30.0

func (_m *PubSubTracer) Prune(p peer.ID, topic string)

Prune provides a mock function with given fields: p, topic

func (*PubSubTracer) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*PubSubTracer) RecvRPC added in v0.30.0

func (_m *PubSubTracer) RecvRPC(rpc *pubsub.RPC)

RecvRPC provides a mock function with given fields: rpc

func (*PubSubTracer) RejectMessage added in v0.30.0

func (_m *PubSubTracer) RejectMessage(msg *pubsub.Message, reason string)

RejectMessage provides a mock function with given fields: msg, reason

func (*PubSubTracer) RemovePeer added in v0.30.0

func (_m *PubSubTracer) RemovePeer(p peer.ID)

RemovePeer provides a mock function with given fields: p

func (*PubSubTracer) SendRPC added in v0.30.0

func (_m *PubSubTracer) SendRPC(rpc *pubsub.RPC, p peer.ID)

SendRPC provides a mock function with given fields: rpc, p

func (*PubSubTracer) Start added in v0.30.0

Start provides a mock function with given fields: _a0

func (*PubSubTracer) ThrottlePeer added in v0.30.0

func (_m *PubSubTracer) ThrottlePeer(p peer.ID)

ThrottlePeer provides a mock function with given fields: p

func (*PubSubTracer) UndeliverableMessage added in v0.30.0

func (_m *PubSubTracer) UndeliverableMessage(msg *pubsub.Message)

UndeliverableMessage provides a mock function with given fields: msg

func (*PubSubTracer) ValidateMessage added in v0.30.0

func (_m *PubSubTracer) ValidateMessage(msg *pubsub.Message)

ValidateMessage provides a mock function with given fields: msg

type RateLimiter added in v0.29.0

type RateLimiter struct {
	mock.Mock
}

RateLimiter is an autogenerated mock type for the RateLimiter type

func NewRateLimiter added in v0.29.0

func NewRateLimiter(t mockConstructorTestingTNewRateLimiter) *RateLimiter

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

func (*RateLimiter) Allow added in v0.29.0

func (_m *RateLimiter) Allow(peerID peer.ID, msgSize int) bool

Allow provides a mock function with given fields: peerID, msgSize

func (*RateLimiter) Done added in v0.30.0

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

Done provides a mock function with given fields:

func (*RateLimiter) IsRateLimited added in v0.29.0

func (_m *RateLimiter) IsRateLimited(peerID peer.ID) bool

IsRateLimited provides a mock function with given fields: peerID

func (*RateLimiter) Ready added in v0.30.0

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

Ready provides a mock function with given fields:

func (*RateLimiter) Start added in v0.29.0

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

Start provides a mock function with given fields: _a0

type RateLimiterConsumer added in v0.30.0

type RateLimiterConsumer struct {
	mock.Mock
}

RateLimiterConsumer is an autogenerated mock type for the RateLimiterConsumer type

func NewRateLimiterConsumer added in v0.30.0

func NewRateLimiterConsumer(t mockConstructorTestingTNewRateLimiterConsumer) *RateLimiterConsumer

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

func (*RateLimiterConsumer) OnRateLimitedPeer added in v0.30.0

func (_m *RateLimiterConsumer) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string)

OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason

type RateLimiterOpt added in v0.29.0

type RateLimiterOpt struct {
	mock.Mock
}

RateLimiterOpt is an autogenerated mock type for the RateLimiterOpt type

func NewRateLimiterOpt added in v0.29.0

func NewRateLimiterOpt(t mockConstructorTestingTNewRateLimiterOpt) *RateLimiterOpt

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

func (*RateLimiterOpt) Execute added in v0.29.0

func (_m *RateLimiterOpt) Execute(limiter p2p.RateLimiter)

Execute provides a mock function with given fields: limiter

type ScoreOption added in v0.29.0

type ScoreOption struct {
	mock.Mock
}

ScoreOption is an autogenerated mock type for the ScoreOption type

func NewScoreOption added in v0.29.0

func NewScoreOption(t mockConstructorTestingTNewScoreOption) *ScoreOption

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

func (*ScoreOption) BuildFlowPubSubScoreOption added in v0.29.0

func (_m *ScoreOption) BuildFlowPubSubScoreOption() pubsub.Option

BuildFlowPubSubScoreOption provides a mock function with given fields:

type ScoreOptionBuilder added in v0.29.0

type ScoreOptionBuilder struct {
	mock.Mock
}

ScoreOptionBuilder is an autogenerated mock type for the ScoreOptionBuilder type

func NewScoreOptionBuilder added in v0.29.0

func NewScoreOptionBuilder(t mockConstructorTestingTNewScoreOptionBuilder) *ScoreOptionBuilder

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

func (*ScoreOptionBuilder) BuildFlowPubSubScoreOption added in v0.29.0

func (_m *ScoreOptionBuilder) BuildFlowPubSubScoreOption() pubsub.Option

BuildFlowPubSubScoreOption provides a mock function with given fields:

type Subscription added in v0.29.0

type Subscription struct {
	mock.Mock
}

Subscription is an autogenerated mock type for the Subscription type

func NewSubscription added in v0.29.0

func NewSubscription(t mockConstructorTestingTNewSubscription) *Subscription

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

func (*Subscription) Cancel added in v0.29.0

func (_m *Subscription) Cancel()

Cancel provides a mock function with given fields:

func (*Subscription) Next added in v0.29.0

func (_m *Subscription) Next(_a0 context.Context) (*pubsub.Message, error)

Next provides a mock function with given fields: _a0

func (*Subscription) Topic added in v0.29.0

func (_m *Subscription) Topic() string

Topic provides a mock function with given fields:

type SubscriptionFilter added in v0.29.0

type SubscriptionFilter struct {
	mock.Mock
}

SubscriptionFilter is an autogenerated mock type for the SubscriptionFilter type

func NewSubscriptionFilter added in v0.29.0

func NewSubscriptionFilter(t mockConstructorTestingTNewSubscriptionFilter) *SubscriptionFilter

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

func (*SubscriptionFilter) CanSubscribe added in v0.29.0

func (_m *SubscriptionFilter) CanSubscribe(_a0 string) bool

CanSubscribe provides a mock function with given fields: _a0

func (*SubscriptionFilter) FilterIncomingSubscriptions added in v0.29.0

func (_m *SubscriptionFilter) FilterIncomingSubscriptions(_a0 peer.ID, _a1 []*pubsub_pb.RPC_SubOpts) ([]*pubsub_pb.RPC_SubOpts, error)

FilterIncomingSubscriptions provides a mock function with given fields: _a0, _a1

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 Subscriptions added in v0.30.0

type Subscriptions struct {
	mock.Mock
}

Subscriptions is an autogenerated mock type for the Subscriptions type

func NewSubscriptions added in v0.30.0

func NewSubscriptions(t mockConstructorTestingTNewSubscriptions) *Subscriptions

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

func (*Subscriptions) HasSubscription added in v0.30.0

func (_m *Subscriptions) HasSubscription(topic channels.Topic) bool

HasSubscription provides a mock function with given fields: topic

func (*Subscriptions) SetUnicastManager added in v0.30.0

func (_m *Subscriptions) SetUnicastManager(uniMgr p2p.UnicastManager)

SetUnicastManager provides a mock function with given fields: uniMgr

type Topic added in v0.29.0

type Topic struct {
	mock.Mock
}

Topic is an autogenerated mock type for the Topic type

func NewTopic added in v0.29.0

func NewTopic(t mockConstructorTestingTNewTopic) *Topic

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

func (*Topic) Close added in v0.29.0

func (_m *Topic) Close() error

Close provides a mock function with given fields:

func (*Topic) Publish added in v0.29.0

func (_m *Topic) Publish(_a0 context.Context, _a1 []byte) error

Publish provides a mock function with given fields: _a0, _a1

func (*Topic) String added in v0.29.0

func (_m *Topic) String() string

String provides a mock function with given fields:

func (*Topic) Subscribe added in v0.29.0

func (_m *Topic) Subscribe() (p2p.Subscription, error)

Subscribe provides a mock function with given fields:

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

type TopicValidatorFunc added in v0.29.0

type TopicValidatorFunc struct {
	mock.Mock
}

TopicValidatorFunc is an autogenerated mock type for the TopicValidatorFunc type

func NewTopicValidatorFunc added in v0.29.0

func NewTopicValidatorFunc(t mockConstructorTestingTNewTopicValidatorFunc) *TopicValidatorFunc

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

func (*TopicValidatorFunc) Execute added in v0.29.0

Execute provides a mock function with given fields: _a0, _a1, _a2

type UnicastManager added in v0.30.0

type UnicastManager struct {
	mock.Mock
}

UnicastManager is an autogenerated mock type for the UnicastManager type

func NewUnicastManager added in v0.30.0

func NewUnicastManager(t mockConstructorTestingTNewUnicastManager) *UnicastManager

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

func (*UnicastManager) CreateStream added in v0.30.0

func (_m *UnicastManager) CreateStream(ctx context.Context, peerID peer.ID, maxAttempts int) (network.Stream, []multiaddr.Multiaddr, error)

CreateStream provides a mock function with given fields: ctx, peerID, maxAttempts

func (*UnicastManager) Register added in v0.30.0

func (_m *UnicastManager) Register(unicast protocols.ProtocolName) error

Register provides a mock function with given fields: unicast

func (*UnicastManager) WithDefaultHandler added in v0.30.0

func (_m *UnicastManager) WithDefaultHandler(defaultHandler network.StreamHandler)

WithDefaultHandler provides a mock function with given fields: defaultHandler

type UnicastManagerFactoryFunc added in v0.30.0

type UnicastManagerFactoryFunc struct {
	mock.Mock
}

UnicastManagerFactoryFunc is an autogenerated mock type for the UnicastManagerFactoryFunc type

func NewUnicastManagerFactoryFunc added in v0.30.0

func NewUnicastManagerFactoryFunc(t mockConstructorTestingTNewUnicastManagerFactoryFunc) *UnicastManagerFactoryFunc

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

func (*UnicastManagerFactoryFunc) Execute added in v0.30.0

func (_m *UnicastManagerFactoryFunc) Execute(logger zerolog.Logger, streamFactory stream.Factory, sporkId flow.Identifier, createStreamRetryDelay time.Duration, connStatus p2p.PeerConnections, metrics module.UnicastManagerMetrics) p2p.UnicastManager

Execute provides a mock function with given fields: logger, streamFactory, sporkId, createStreamRetryDelay, connStatus, metrics

type UnicastRateLimiterDistributor added in v0.30.0

type UnicastRateLimiterDistributor struct {
	mock.Mock
}

UnicastRateLimiterDistributor is an autogenerated mock type for the UnicastRateLimiterDistributor type

func NewUnicastRateLimiterDistributor added in v0.30.0

func NewUnicastRateLimiterDistributor(t mockConstructorTestingTNewUnicastRateLimiterDistributor) *UnicastRateLimiterDistributor

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

func (*UnicastRateLimiterDistributor) AddConsumer added in v0.30.0

func (_m *UnicastRateLimiterDistributor) AddConsumer(consumer p2p.RateLimiterConsumer)

AddConsumer provides a mock function with given fields: consumer

func (*UnicastRateLimiterDistributor) OnRateLimitedPeer added in v0.30.0

func (_m *UnicastRateLimiterDistributor) OnRateLimitedPeer(pid peer.ID, role string, msgType string, topic string, reason string)

OnRateLimitedPeer provides a mock function with given fields: pid, role, msgType, topic, reason

Jump to

Keyboard shortcuts

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