Documentation
¶
Index ¶
- Constants
- Variables
- type P2PNode
- func (n *P2PNode) Addrs() []multiaddr.Multiaddr
- func (n *P2PNode) Close() error
- func (n *P2PNode) Connect(ctx context.Context, addrStr string) error
- func (n *P2PNode) ID() peer.ID
- func (n *P2PNode) Multiaddr() string
- func (n *P2PNode) NewStream(ctx context.Context, p peer.ID, pid core.ProtocolID) (core.Stream, error)
- func (n *P2PNode) PeerCount() int
- func (n *P2PNode) Peers() int
- func (n *P2PNode) SignMessage(msg []byte) []byte
- func (n *P2PNode) String() string
- type PeerInfo
- type StreamManager
Constants ¶
View Source
const ( ProtocolIDPing = "/pi/ping/1.0.0" ProtocolIDTx = "/pi/tx/1.0.0" ProtocolIDBlock = "/pi/block/1.0.0" ProtocolIDGossip = "/pi/gossip/1.0.0" ProtocolIDDiscovery = "/pi/discovery/1.0.0" )
Variables ¶
View Source
var Protocols = []core.ProtocolID{ ProtocolIDPing, ProtocolIDTx, ProtocolIDBlock, ProtocolIDGossip, ProtocolIDDiscovery, }
Functions ¶
This section is empty.
Types ¶
type P2PNode ¶
type P2PNode struct {
// contains filtered or unexported fields
}
func NewP2PNode ¶
func (*P2PNode) SignMessage ¶
type StreamManager ¶
type StreamManager struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.