Documentation ¶
Index ¶
- Constants
- func FloodTheNetwork(peer p2p.Messenger, topic string, isFlooding *atomic.Value, messageSize uint64)
- type MessageProcessor
- func (mp *MessageProcessor) IsInterfaceNil() bool
- func (mp *MessageProcessor) NumMessagesProcessed() uint32
- func (mp *MessageProcessor) NumMessagesReceived() uint32
- func (mp *MessageProcessor) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error
- func (mp *MessageProcessor) SizeMessagesProcessed() uint64
- func (mp *MessageProcessor) SizeMessagesReceived() uint64
Constants ¶
View Source
const DurationBootstrapingTime = 2 * time.Second
DurationBootstrapingTime -
Variables ¶
This section is empty.
Functions ¶
Types ¶
type MessageProcessor ¶
type MessageProcessor struct { FloodPreventer process.FloodPreventer // contains filtered or unexported fields }
MessageProcessor -
func CreateTopicsAndMockInterceptors ¶
func CreateTopicsAndMockInterceptors( peers []p2p.Messenger, blacklistHandlers []floodPreventers.QuotaStatusHandler, topic string, peerMaxNumMessages uint32, peerMaxSize uint64, ) ([]*MessageProcessor, error)
CreateTopicsAndMockInterceptors -
func (*MessageProcessor) IsInterfaceNil ¶
func (mp *MessageProcessor) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*MessageProcessor) NumMessagesProcessed ¶
func (mp *MessageProcessor) NumMessagesProcessed() uint32
NumMessagesProcessed returns the number of processed messages
func (*MessageProcessor) NumMessagesReceived ¶
func (mp *MessageProcessor) NumMessagesReceived() uint32
NumMessagesReceived returns the number of received messages
func (*MessageProcessor) ProcessReceivedMessage ¶
func (mp *MessageProcessor) ProcessReceivedMessage(message p2p.MessageP2P, fromConnectedPeer p2p.PeerID) error
ProcessReceivedMessage is the callback function from the p2p side whenever a new message is received
func (*MessageProcessor) SizeMessagesProcessed ¶
func (mp *MessageProcessor) SizeMessagesProcessed() uint64
SizeMessagesProcessed returns the total size of the processed messages
func (*MessageProcessor) SizeMessagesReceived ¶
func (mp *MessageProcessor) SizeMessagesReceived() uint64
SizeMessagesReceived returns the total size of the received messages
Click to show internal directories.
Click to hide internal directories.