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

# README

go-p2p

It's the assembly of libp2p to build a working network layer for p2p applications.

# Packages

No description provided by the author

# Functions

BootNode determines whether this libp2p host is a bootnode.
ConnectTimeout is the option to override the connect timeout.
EnsureIPv4 returns an IPv4 address regardless the input is a IPv4 address or host name.
ExternalHostName is the option to set the host name or IP address seen from external.
ExternalPort is the option to set the port number seen from external.
GetBroadcastMsg retrieves *pubsub.Message from broadcast message context.
GetUnicastStream retrieves net.Stream from unicast request context.
Gossip is to indicate using gossip protocol.
HostName is the option to override the host name or IP address.
Logger returns the logger.
MasterKey is to determine network identifier.
NewHost constructs a host struct.
Port is the option to override the port number.
PrivateKey is to determine private key to use for addressing.
SecureIO is to indicate using secured I/O.
SetLogger sets the logger.
WithConnectionManagerConfig set configuration for connection manager.

# Variables

DefaultConfig is a set of default configs.

# Structs

Config enumerates the configs required by a host.
Host is the main struct that represents a host that communicating with the rest of the P2P networks.

# Interfaces

HostOperator defines the peer to peer functionality available.

# Type aliases

HandleBroadcast defines the callback function triggered when a broadcast message reaches a host.
Option defines the option function to modify the config for a host.