Documentation ¶
Index ¶
- type ConnectionGater
- func (_m *ConnectionGater) InterceptAccept(_a0 network.ConnMultiaddrs) bool
- func (_m *ConnectionGater) InterceptAddrDial(_a0 peer.ID, _a1 multiaddr.Multiaddr) bool
- func (_m *ConnectionGater) InterceptPeerDial(p peer.ID) bool
- func (_m *ConnectionGater) InterceptSecured(_a0 network.Direction, _a1 peer.ID, _a2 network.ConnMultiaddrs) bool
- func (_m *ConnectionGater) InterceptUpgraded(_a0 network.Conn) (bool, control.DisconnectReason)
- type Connector
- type GetTimeNow
- type IDTranslator
- type LibP2PNode
- func (_m *LibP2PNode) AddPeer(ctx context.Context, peerInfo peer.AddrInfo) error
- func (_m *LibP2PNode) CreateStream(ctx context.Context, peerID peer.ID) (network.Stream, error)
- func (_m *LibP2PNode) Done() <-chan struct{}
- func (_m *LibP2PNode) GetIPPort() (string, string, error)
- func (_m *LibP2PNode) GetPeersForProtocol(pid protocol.ID) peer.IDSlice
- func (_m *LibP2PNode) Host() host.Host
- func (_m *LibP2PNode) IsConnected(peerID peer.ID) (bool, error)
- func (_m *LibP2PNode) ListPeers(topic string) []peer.ID
- func (_m *LibP2PNode) PeerManagerComponent() component.Component
- func (_m *LibP2PNode) Publish(ctx context.Context, topic channels.Topic, data []byte) error
- func (_m *LibP2PNode) Ready() <-chan struct{}
- func (_m *LibP2PNode) RemovePeer(peerID peer.ID) error
- func (_m *LibP2PNode) RequestPeerUpdate()
- func (_m *LibP2PNode) Routing() routing.Routing
- func (_m *LibP2PNode) RoutingTable() *kbucket.RoutingTable
- func (_m *LibP2PNode) SetComponentManager(cm *component.ComponentManager)
- func (_m *LibP2PNode) SetPubSub(ps *pubsub.PubSub)
- func (_m *LibP2PNode) SetRouting(r routing.Routing)
- func (_m *LibP2PNode) Start(ctx irrecoverable.SignalerContext)
- func (_m *LibP2PNode) Stop() error
- func (_m *LibP2PNode) Subscribe(topic channels.Topic, topicValidator pubsub.ValidatorEx) (*pubsub.Subscription, error)
- func (_m *LibP2PNode) UnSubscribe(topic channels.Topic) error
- func (_m *LibP2PNode) WithDefaultUnicastProtocol(defaultHandler network.StreamHandler, preferred []unicast.ProtocolName) error
- func (_m *LibP2PNode) WithPeersProvider(peersProvider p2p.PeersProvider)
- type NetworkOptFunction
- type PeerFilter
- type PeerManager
- func (_m *PeerManager) Done() <-chan struct{}
- func (_m *PeerManager) ForceUpdatePeers(_a0 context.Context)
- func (_m *PeerManager) Ready() <-chan struct{}
- func (_m *PeerManager) RequestPeerUpdate()
- func (_m *PeerManager) SetPeersProvider(_a0 p2p.PeersProvider)
- func (_m *PeerManager) Start(_a0 irrecoverable.SignalerContext)
- type PeerManagerFactoryFunc
- type PeersProvider
- type RateLimiter
- type RateLimiterOpt
- type SubscriptionProvider
- type TopicProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConnectionGater ¶ added in v0.29.0
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
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 ¶
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.
type GetTimeNow ¶ added in v0.29.0
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 IDTranslator ¶
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 LibP2PNode ¶ added in v0.29.0
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
AddPeer provides a mock function with given fields: ctx, peerInfo
func (*LibP2PNode) CreateStream ¶ added in v0.29.0
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) 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) Publish ¶ added in v0.29.0
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) SetPubSub ¶ added in v0.29.0
func (_m *LibP2PNode) SetPubSub(ps *pubsub.PubSub)
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) 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 pubsub.ValidatorEx) (*pubsub.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 []unicast.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 ¶
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 ¶
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.
type PeerManager ¶
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 ¶
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 ¶
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 RateLimiter ¶ added in v0.29.0
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
Allow provides a mock function with given fields: peerID, msg
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) SetTimeNowFunc ¶ added in v0.29.0
func (_m *RateLimiter) SetTimeNowFunc(now p2p.GetTimeNow)
SetTimeNowFunc provides a mock function with given fields: now
func (*RateLimiter) Start ¶ added in v0.29.0
func (_m *RateLimiter) Start()
Start provides a mock function with given fields:
func (*RateLimiter) Stop ¶ added in v0.29.0
func (_m *RateLimiter) Stop()
Stop provides a mock function with given fields:
type RateLimiterOpt ¶ added in v0.29.0
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 SubscriptionProvider ¶
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 ¶
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: