package
0.0.1
Repository: https://github.com/libonomy/libonomy-p2p.git
Documentation: pkg.go.dev

# Functions

NewMessageValidation creates a message validation struct to pass to the protocol.
NewSimulator Creates a p2p simulation by providing nodes as p2p services and bridge them.

# Structs

DataBytes is a byte array payload wrapper.
DataMsgWrapper is a req-res payload wrapper.
MessageValidation is a gossip message validation event.
Node is a simulated p2p node that can be used as a p2p service.
P2PMetadata is a generic metadata interface.
Simulator is a p2p node factory and message bridge that is used to simulate the p2p layer provided to protocols without using real network or p2p code.

# Interfaces

Data is a wrapper around a message that can hold either raw bytes message or a req-res wrapper.
DirectMessage is an interface that represents a simple direct message structure.
GossipMessage is an interface that represents a simple gossip message structure.
Service is an interface that represents a networking service (ideally p2p) that we can use to send messages or listen to incoming messages.