peerDiscovery

package
v1.3.21 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2022 License: GPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunTest

func RunTest(peers []p2p.Messenger, testIndex int, topic string) bool

RunTest will test if all the peers receive a message

Types

type MessageProcesssor

type MessageProcesssor struct {
	RequiredValue []byte
	// contains filtered or unexported fields
}

MessageProcesssor -

func NewMessageProcessor

func NewMessageProcessor(chanDone chan struct{}, requiredVal []byte) *MessageProcesssor

NewMessageProcessor -

func (*MessageProcesssor) IsInterfaceNil

func (mp *MessageProcesssor) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*MessageProcesssor) ProcessReceivedMessage

func (mp *MessageProcesssor) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error

ProcessReceivedMessage -

func (*MessageProcesssor) WasDataReceived

func (mp *MessageProcesssor) WasDataReceived() bool

WasDataReceived -

type SimpleMessageProcessor added in v1.0.114

type SimpleMessageProcessor struct {
	// contains filtered or unexported fields
}

SimpleMessageProcessor records the last received message

func (*SimpleMessageProcessor) GetLastMessage added in v1.0.114

func (smp *SimpleMessageProcessor) GetLastMessage() []byte

GetLastMessage returns the last message received

func (*SimpleMessageProcessor) IsInterfaceNil added in v1.0.114

func (smp *SimpleMessageProcessor) IsInterfaceNil() bool

IsInterfaceNil returns true if there is no value under the interface

func (*SimpleMessageProcessor) ProcessReceivedMessage added in v1.0.114

func (smp *SimpleMessageProcessor) ProcessReceivedMessage(message p2p.MessageP2P, _ core.PeerID) error

ProcessReceivedMessage records the message

Jump to

Keyboard shortcuts

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