testnetwork

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: AGPL-3.0, ISC Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockNet

type MockNet struct {
	MessageCh chan network.ReceivedMessage
	// contains filtered or unexported fields
}

func NewMockNetwork

func NewMockNetwork() *MockNet

func (*MockNet) Receive

func (m *MockNet) Receive(msg network.ReceivedMessage)

func (*MockNet) ReceivedChannel

func (m *MockNet) ReceivedChannel() <-chan network.ReceivedMessage

func (*MockNet) ResetSentMessages

func (m *MockNet) ResetSentMessages(protocol string)

func (*MockNet) Send

func (m *MockNet) Send(msg network.OutputMessage, receivers []peer.ID) error

func (*MockNet) SentMessages

func (m *MockNet) SentMessages(protocol string) []PeerMessage

type PeerMessage

type PeerMessage struct {
	peer.ID
	network.OutputMessage
}

Jump to

Keyboard shortcuts

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