Categorygithub.com/dsisc/p2p
modulepackage
1.1.0
Repository: https://github.com/dsisc/p2p.git
Documentation: pkg.go.dev

# README

p2p

A P2P network implemention based on Gossip Protocol.

Build Status codecov

Getting started

Running it then should be as simple as:

$ make all

Testing

$ make test

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author

# Functions

LocalState get local current state.
NewAddressManager create an address manager instance.
NewDebugHandler create a new NewDebugHandler instance.
NewInboundPeer new inbound peer instance.
NewInboundPeer new outbound peer instance.
NewP2P create a p2p service instance.
NewPeerConn create a PeerConn instance.

# Constants

the maximum buffer To receive message.
deadline of conn write.

# Structs

AddressManager is used To manage neighbor's address.
AttemptInfo represent the address attempt info.
DebugHandler is a handler used to trace p2p message and report the p2p topo info.
internal message type.
P2P is p2p service implementation.
Peer represent the peer.
PeerCom provides the basic information of a peer.
PeerConn is the abstract of the net.Conn To this peer.

# Interfaces

No description provided by the author

# Type aliases

PeerFilter used To filter the peer satisfy the request.