Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewTopicResolverSender ¶
func NewTopicResolverSender(arg ArgTopicResolverSender) (*topicResolverSender, error)
NewTopicResolverSender returns a new topic resolver instance
Types ¶
type ArgTopicResolverSender ¶
type ArgTopicResolverSender struct { Messenger dataRetriever.MessageHandler TopicName string PeerListCreator dataRetriever.PeerListCreator Marshalizer marshal.Marshalizer Randomizer dataRetriever.IntRandomizer OutputAntiflooder dataRetriever.P2PAntifloodHandler NumIntraShardPeers int NumCrossShardPeers int NumFullHistoryPeers int CurrentNetworkEpochProvider dataRetriever.CurrentNetworkEpochProviderHandler PreferredPeersHolder dataRetriever.PreferredPeersHolderHandler SelfShardIdProvider dataRetriever.SelfShardIDProvider PeersRatingHandler dataRetriever.PeersRatingHandler TargetShardId uint32 }
ArgTopicResolverSender is the argument structure used to create new TopicResolverSender instance
type DiffPeerListCreator ¶
type DiffPeerListCreator struct {
// contains filtered or unexported fields
}
DiffPeerListCreator can create a peer list by making the set difference between peers on main topic and the exclusion topic. If the resulting list is empty, will return the peers on the main topic.
func NewDiffPeerListCreator ¶
func NewDiffPeerListCreator( messenger dataRetriever.MessageHandler, mainTopic string, intraShardTopic string, excludePeersFromTopic string, ) (*DiffPeerListCreator, error)
NewDiffPeerListCreator is the constructor for DiffPeerListCreator
func (*DiffPeerListCreator) CrossShardPeerList ¶
func (dplc *DiffPeerListCreator) CrossShardPeerList() []core.PeerID
CrossShardPeerList will return the generated list of cross shard peers
func (*DiffPeerListCreator) FullHistoryList ¶
func (dplc *DiffPeerListCreator) FullHistoryList() []core.PeerID
FullHistoryList returns the full history peers list
func (*DiffPeerListCreator) IntraShardPeerList ¶
func (dplc *DiffPeerListCreator) IntraShardPeerList() []core.PeerID
IntraShardPeerList returns the intra shard peer list
func (*DiffPeerListCreator) IsInterfaceNil ¶
func (dplc *DiffPeerListCreator) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface