Documentation ¶
Index ¶
- type MessengerStub
- func (ms *MessengerStub) Addresses() []string
- func (ms *MessengerStub) Bootstrap() error
- func (ms *MessengerStub) Broadcast(topic string, buff []byte)
- func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
- func (ms *MessengerStub) BroadcastOnChannelBlocking(channel string, topic string, buff []byte) error
- func (ms *MessengerStub) Close() error
- func (ms *MessengerStub) ConnectToPeer(address string) error
- func (ms *MessengerStub) ConnectedAddresses() []string
- func (ms *MessengerStub) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID
- func (ms *MessengerStub) ConnectedPeers() []core.PeerID
- func (ms *MessengerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
- func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
- func (ms *MessengerStub) GetConnectedPeersInfo() *p2p.ConnectedPeersInfo
- func (ms *MessengerStub) HasTopic(name string) bool
- func (ms *MessengerStub) HasTopicValidator(name string) bool
- func (ms *MessengerStub) ID() core.PeerID
- func (ms *MessengerStub) IsConnected(peerID core.PeerID) bool
- func (ms *MessengerStub) IsConnectedToTheNetwork() bool
- func (ms *MessengerStub) IsInterfaceNil() bool
- func (ms *MessengerStub) PeerAddresses(pid core.PeerID) []string
- func (ms *MessengerStub) Peers() []core.PeerID
- func (ms *MessengerStub) Port() int
- func (ms *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
- func (ms *MessengerStub) SendToConnectedPeer(topic string, buff []byte, peerID core.PeerID) error
- func (ms *MessengerStub) SetPeerDenialEvaluator(handler p2p.PeerDenialEvaluator) error
- func (ms *MessengerStub) SetPeerShardResolver(peerShardResolver p2p.PeerShardResolver) error
- func (ms *MessengerStub) SetThresholdMinConnectedPeers(minConnectedPeers int) error
- func (ms *MessengerStub) ThresholdMinConnectedPeers() int
- func (ms *MessengerStub) UnjoinAllTopics() error
- func (ms *MessengerStub) UnregisterAllMessageProcessors() error
- func (ms *MessengerStub) UnregisterMessageProcessor(topic string, identifier string) error
- type NetworkShardingCollectorStub
- func (nscs *NetworkShardingCollectorStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
- func (nscs *NetworkShardingCollectorStub) IsInterfaceNil() bool
- func (nscs *NetworkShardingCollectorStub) UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32)
- func (nscs *NetworkShardingCollectorStub) UpdatePeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType)
- type PeersHolderStub
- func (p *PeersHolderStub) Clear()
- func (p *PeersHolderStub) Contains(peerID core.PeerID) bool
- func (p *PeersHolderStub) Get() map[uint32][]core.PeerID
- func (p *PeersHolderStub) IsInterfaceNil() bool
- func (p *PeersHolderStub) Put(publicKey []byte, peerID core.PeerID, shardID uint32)
- func (p *PeersHolderStub) Remove(peerID core.PeerID)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MessengerStub ¶ added in v1.2.10
type MessengerStub struct { ConnectedFullHistoryPeersOnTopicCalled func(topic string) []core.PeerID IDCalled func() core.PeerID CloseCalled func() error CreateTopicCalled func(name string, createChannelForTopic bool) error HasTopicCalled func(name string) bool HasTopicValidatorCalled func(name string) bool BroadcastOnChannelCalled func(channel string, topic string, buff []byte) BroadcastCalled func(topic string, buff []byte) RegisterMessageProcessorCalled func(topic string, identifier string, handler p2p.MessageProcessor) error BootstrapCalled func() error PeerAddressesCalled func(pid core.PeerID) []string BroadcastOnChannelBlockingCalled func(channel string, topic string, buff []byte) error IsConnectedToTheNetworkCalled func() bool PeersCalled func() []core.PeerID AddressesCalled func() []string ConnectToPeerCalled func(address string) error IsConnectedCalled func(peerID core.PeerID) bool ConnectedPeersCalled func() []core.PeerID ConnectedAddressesCalled func() []string ConnectedPeersOnTopicCalled func(topic string) []core.PeerID UnregisterAllMessageProcessorsCalled func() error UnregisterMessageProcessorCalled func(topic string, identifier string) error SendToConnectedPeerCalled func(topic string, buff []byte, peerID core.PeerID) error ThresholdMinConnectedPeersCalled func() int SetThresholdMinConnectedPeersCalled func(minConnectedPeers int) error SetPeerShardResolverCalled func(peerShardResolver p2p.PeerShardResolver) error SetPeerDenialEvaluatorCalled func(handler p2p.PeerDenialEvaluator) error GetConnectedPeersInfoCalled func() *p2p.ConnectedPeersInfo UnjoinAllTopicsCalled func() error PortCalled func() int }
MessengerStub -
func (*MessengerStub) Addresses ¶ added in v1.2.10
func (ms *MessengerStub) Addresses() []string
Addresses -
func (*MessengerStub) Bootstrap ¶ added in v1.2.10
func (ms *MessengerStub) Bootstrap() error
Bootstrap -
func (*MessengerStub) Broadcast ¶ added in v1.2.10
func (ms *MessengerStub) Broadcast(topic string, buff []byte)
Broadcast -
func (*MessengerStub) BroadcastOnChannel ¶ added in v1.2.10
func (ms *MessengerStub) BroadcastOnChannel(channel string, topic string, buff []byte)
BroadcastOnChannel -
func (*MessengerStub) BroadcastOnChannelBlocking ¶ added in v1.2.10
func (ms *MessengerStub) BroadcastOnChannelBlocking(channel string, topic string, buff []byte) error
BroadcastOnChannelBlocking -
func (*MessengerStub) ConnectToPeer ¶ added in v1.2.10
func (ms *MessengerStub) ConnectToPeer(address string) error
ConnectToPeer -
func (*MessengerStub) ConnectedAddresses ¶ added in v1.2.10
func (ms *MessengerStub) ConnectedAddresses() []string
ConnectedAddresses -
func (*MessengerStub) ConnectedFullHistoryPeersOnTopic ¶ added in v1.2.10
func (ms *MessengerStub) ConnectedFullHistoryPeersOnTopic(topic string) []core.PeerID
ConnectedFullHistoryPeersOnTopic -
func (*MessengerStub) ConnectedPeers ¶ added in v1.2.10
func (ms *MessengerStub) ConnectedPeers() []core.PeerID
ConnectedPeers -
func (*MessengerStub) ConnectedPeersOnTopic ¶ added in v1.2.10
func (ms *MessengerStub) ConnectedPeersOnTopic(topic string) []core.PeerID
ConnectedPeersOnTopic -
func (*MessengerStub) CreateTopic ¶ added in v1.2.10
func (ms *MessengerStub) CreateTopic(name string, createChannelForTopic bool) error
CreateTopic -
func (*MessengerStub) GetConnectedPeersInfo ¶ added in v1.2.10
func (ms *MessengerStub) GetConnectedPeersInfo() *p2p.ConnectedPeersInfo
GetConnectedPeersInfo -
func (*MessengerStub) HasTopic ¶ added in v1.2.10
func (ms *MessengerStub) HasTopic(name string) bool
HasTopic -
func (*MessengerStub) HasTopicValidator ¶ added in v1.2.10
func (ms *MessengerStub) HasTopicValidator(name string) bool
HasTopicValidator -
func (*MessengerStub) IsConnected ¶ added in v1.2.10
func (ms *MessengerStub) IsConnected(peerID core.PeerID) bool
IsConnected -
func (*MessengerStub) IsConnectedToTheNetwork ¶ added in v1.2.10
func (ms *MessengerStub) IsConnectedToTheNetwork() bool
IsConnectedToTheNetwork -
func (*MessengerStub) IsInterfaceNil ¶ added in v1.2.10
func (ms *MessengerStub) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessengerStub) PeerAddresses ¶ added in v1.2.10
func (ms *MessengerStub) PeerAddresses(pid core.PeerID) []string
PeerAddresses -
func (*MessengerStub) Peers ¶ added in v1.2.10
func (ms *MessengerStub) Peers() []core.PeerID
Peers -
func (*MessengerStub) RegisterMessageProcessor ¶ added in v1.2.10
func (ms *MessengerStub) RegisterMessageProcessor(topic string, identifier string, handler p2p.MessageProcessor) error
RegisterMessageProcessor -
func (*MessengerStub) SendToConnectedPeer ¶ added in v1.2.10
SendToConnectedPeer -
func (*MessengerStub) SetPeerDenialEvaluator ¶ added in v1.2.10
func (ms *MessengerStub) SetPeerDenialEvaluator(handler p2p.PeerDenialEvaluator) error
SetPeerDenialEvaluator -
func (*MessengerStub) SetPeerShardResolver ¶ added in v1.2.10
func (ms *MessengerStub) SetPeerShardResolver(peerShardResolver p2p.PeerShardResolver) error
SetPeerShardResolver -
func (*MessengerStub) SetThresholdMinConnectedPeers ¶ added in v1.2.10
func (ms *MessengerStub) SetThresholdMinConnectedPeers(minConnectedPeers int) error
SetThresholdMinConnectedPeers -
func (*MessengerStub) ThresholdMinConnectedPeers ¶ added in v1.2.10
func (ms *MessengerStub) ThresholdMinConnectedPeers() int
ThresholdMinConnectedPeers -
func (*MessengerStub) UnjoinAllTopics ¶ added in v1.2.10
func (ms *MessengerStub) UnjoinAllTopics() error
UnjoinAllTopics -
func (*MessengerStub) UnregisterAllMessageProcessors ¶ added in v1.2.10
func (ms *MessengerStub) UnregisterAllMessageProcessors() error
UnregisterAllMessageProcessors -
func (*MessengerStub) UnregisterMessageProcessor ¶ added in v1.2.10
func (ms *MessengerStub) UnregisterMessageProcessor(topic string, identifier string) error
UnregisterMessageProcessor -
type NetworkShardingCollectorStub ¶
type NetworkShardingCollectorStub struct { UpdatePeerIDInfoCalled func(pid core.PeerID, pk []byte, shardID uint32) UpdatePeerIdSubTypeCalled func(pid core.PeerID, peerSubType core.P2PPeerSubType) GetPeerInfoCalled func(pid core.PeerID) core.P2PPeerInfo }
NetworkShardingCollectorStub -
func (*NetworkShardingCollectorStub) GetPeerInfo ¶
func (nscs *NetworkShardingCollectorStub) GetPeerInfo(pid core.PeerID) core.P2PPeerInfo
GetPeerInfo -
func (*NetworkShardingCollectorStub) IsInterfaceNil ¶
func (nscs *NetworkShardingCollectorStub) IsInterfaceNil() bool
IsInterfaceNil -
func (*NetworkShardingCollectorStub) UpdatePeerIDInfo ¶
func (nscs *NetworkShardingCollectorStub) UpdatePeerIDInfo(pid core.PeerID, pk []byte, shardID uint32)
UpdatePeerIDInfo -
func (*NetworkShardingCollectorStub) UpdatePeerIdSubType ¶
func (nscs *NetworkShardingCollectorStub) UpdatePeerIdSubType(pid core.PeerID, peerSubType core.P2PPeerSubType)
UpdatePeerIdSubType
type PeersHolderStub ¶
type PeersHolderStub struct { PutCalled func(publicKey []byte, peerID core.PeerID, shardID uint32) GetCalled func() map[uint32][]core.PeerID ContainsCalled func(peerID core.PeerID) bool RemoveCalled func(peerID core.PeerID) ClearCalled func() }
PeersHolderStub -
func (*PeersHolderStub) Contains ¶
func (p *PeersHolderStub) Contains(peerID core.PeerID) bool
Contains -
func (*PeersHolderStub) IsInterfaceNil ¶
func (p *PeersHolderStub) IsInterfaceNil() bool
IsInterfaceNil -