topicResolverSender

package
v1.0.42 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2019 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const NumPeersToQuery = 2

NumPeersToQuery number of peers to send the message

Variables

This section is empty.

Functions

func NewTopicResolverSender

func NewTopicResolverSender(
	messenger dataRetriever.MessageHandler,
	topicName string,
	peerListCreator dataRetriever.PeerListCreator,
	marshalizer marshal.Marshalizer,
	randomizer dataRetriever.IntRandomizer,
	targetShardId uint32,
) (*topicResolverSender, error)

NewTopicResolverSender returns a new topic resolver instance

Types

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,
	excludePeersFromTopic string,
) (*DiffPeerListCreator, error)

NewDiffPeerListCreator is the constructor for DiffPeerListCreator

func (*DiffPeerListCreator) IsInterfaceNil

func (dplc *DiffPeerListCreator) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*DiffPeerListCreator) PeerList

func (dplc *DiffPeerListCreator) PeerList() []p2p.PeerID

PeerList will return the generated list of peers

Jump to

Keyboard shortcuts

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