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 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) HasSubscription(topic channels.Topic) bool
- 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 p2p.PubSubAdapter)
- 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 p2p.TopicValidatorFunc) (p2p.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 PubSubAdapter
- func (_m *PubSubAdapter) GetTopics() []string
- func (_m *PubSubAdapter) Join(topic string) (p2p.Topic, error)
- func (_m *PubSubAdapter) ListPeers(topic string) []peer.ID
- func (_m *PubSubAdapter) RegisterTopicValidator(topic string, topicValidator p2p.TopicValidatorFunc) error
- func (_m *PubSubAdapter) UnregisterTopicValidator(topic string) error
- type PubSubAdapterConfig
- func (_m *PubSubAdapterConfig) WithAppSpecificRpcInspector(f func(peer.ID, *pubsub.RPC) error)
- func (_m *PubSubAdapterConfig) WithMessageIdFunction(f func([]byte) string)
- func (_m *PubSubAdapterConfig) WithRoutingDiscovery(_a0 routing.ContentRouting)
- func (_m *PubSubAdapterConfig) WithScoreOption(_a0 p2p.ScoreOptionBuilder)
- func (_m *PubSubAdapterConfig) WithSubscriptionFilter(_a0 p2p.SubscriptionFilter)
- type ScoreOption
- type ScoreOptionBuilder
- type Subscription
- type SubscriptionFilter
- type SubscriptionProvider
- type Topic
- type TopicProvider
- type TopicValidatorFunc
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 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) 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) 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 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) 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 []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 PubSubAdapter ¶ added in v0.29.0
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) 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) 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) 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
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) WithAppSpecificRpcInspector ¶ added in v0.29.0
WithAppSpecificRpcInspector provides a mock function with given fields: f
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) WithSubscriptionFilter ¶ added in v0.29.0
func (_m *PubSubAdapterConfig) WithSubscriptionFilter(_a0 p2p.SubscriptionFilter)
WithSubscriptionFilter provides a mock function with given fields: _a0
type ScoreOption ¶ added in v0.29.0
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
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
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) 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
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 ¶
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 Topic ¶ added in v0.29.0
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) Publish ¶ added in v0.29.0
Publish provides a mock function with given fields: _a0, _a1
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:
type TopicValidatorFunc ¶ added in v0.29.0
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.
Source Files ¶
- connection_gater.go
- connector.go
- id_translator.go
- lib_p2_p_node.go
- network_opt_function.go
- peer_filter.go
- peer_manager.go
- peer_manager_factory_func.go
- peers_provider.go
- pub_sub_adapter.go
- pub_sub_adapter_config.go
- score_option.go
- score_option_builder.go
- subscription.go
- subscription_filter.go
- subscription_provider.go
- topic.go
- topic_provider.go
- topic_validator_func.go