package
0.20.1
Repository: https://github.com/libp2p/go-libp2p-core.git
Documentation: pkg.go.dev

# Functions

GetDialPeerTimeout returns the current DialPeer timeout (or the default).
EXPERIMENTAL GetForceDirectDial returns true if the force direct dial option is set in the context.
GetNoDial returns true if the no dial option is set in the context.
GetSimultaneousConnect returns true if the simultaneous connect option is set in the context.
GetUseTransient returns true if the use transient option is set in the context.
WithDialPeerTimeout returns a new context with the DialPeer timeout applied.
EXPERIMENTAL WithForceDirectDial constructs a new context with an option that instructs the network to attempt to force a direct connection to a peer via a dial even if a proxied connection to it already exists.
WithNoDial constructs a new context with an option that instructs the network to not attempt a new dial when opening a stream.
WithSimultaneousConnect constructs a new context with an option that instructs the transport to apply hole punching logic where applicable.
WithUseTransient constructs a new context with an option that instructs the network that it is acceptable to use a transient connection when opening a new stream.

# Constants

CanConnect means recently connected to peer, terminated gracefully Deprecated: use github.com/libp2p/go-libp2p/core/network.CanConnect instead.
CannotConnect means recently attempted connecting but failed to connect.
Connected means has an open, live connection to peer Deprecated: use github.com/libp2p/go-libp2p/core/network.Connected instead.
DirInbound is for when the remote peer initiated a connection.
DirOutbound is for when the local peer initiated a connection.
DirUnknown is the default direction.
MessageSizeMax is a soft (recommended) maximum for network messages.
NATDeviceTypeCone indicates that the NAT device is a Cone NAT.
NATDeviceTypeSymmetric indicates that the NAT device is a Symmetric NAT.
NATDeviceTypeUnknown indicates that the type of the NAT device is unknown.
NATTransportTCP means that the NAT Device Type has been determined for the TCP Protocol.
NATTransportUDP means that the NAT Device Type has been determined for the UDP Protocol.
NotConnected means no connection to peer, and no extra information (default) Deprecated: use github.com/libp2p/go-libp2p/core/network.NotConnected instead.
ReachabilityPrivate indicates that the node is not reachable from the public internet.
ReachabilityPublic indicates that the node is reachable from the public internet.
ReachabilityUnknown indicates that the reachability status of the node is unknown.
ReservationPriorityAlways is a reservation priority that indicates a reservation if there is enough memory, regardless of scope utilization.
ReservationPriorityHigh is a reservation prioirity that indicates a reservation if the scope memory utilization is at 80% or less.
ReservationPriorityLow is a reservation priority that indicates a reservation if the scope memory utilization is at 40% or less.
ReservationPriorityMedium is a reservation priority that indicates a reservation if the scope memory utilization is at 60% or less.

# Variables

DialPeerTimeout is the default timeout for a single call to `DialPeer`.
ErrNoConn is returned when attempting to open a stream to a peer with the NoDial option and no usable connection is available.
ErrNoRemoteAddrs is returned when there are no addresses associated with a peer during a dial.
ErrReset is returned when reading or writing on a reset stream.
ErrResourceLimitExceeded is returned when attempting to perform an operation that would exceed system resource limits.
ErrResourceScopeClosed is returned when attemptig to reserve resources in a closed resource scope.
ErrTransientConn is returned when attempting to open a stream to a peer with only a transient connection, without specifying the UseTransient option.
Global noop notifiee.
NullResourceManager is a stub for tests and initialization of default values Deprecated: use github.com/libp2p/go-libp2p/core/network.NullResourceManager instead.

# Type aliases

Conn is a connection to a remote peer.
Connectedness signals the capacity for a connection with a given node.
ConnManagementScope is the low level interface for connection resource scopes.
ConnMultiaddrs is an interface mixin for connection types that provide multiaddr addresses for the endpoints.
ConnScope is the user view of a connection scope Deprecated: use github.com/libp2p/go-libp2p/core/network.ConnScope instead.
ConnScoper is the interface that one can mix into a connection interface to give it a resource management scope Deprecated: use github.com/libp2p/go-libp2p/core/network.ConnScoper instead.
ConnSecurity is the interface that one can mix into a connection interface to give it the security methods.
ConnStat is an interface mixin for connection types that provide connection statistics.
ConnStats stores metadata pertaining to a given Conn.
Dialer represents a service that can dial out to peers (this is usually just a Network, but other services may not need the whole stack, and thus it becomes easier to mock) Deprecated: use github.com/libp2p/go-libp2p/core/network.Dialer instead.
Direction represents which peer in a stream initiated a connection.
Multiplexer wraps a net.Conn with a stream multiplexing implementation and returns a MuxedConn that supports opening multiple streams over the underlying net.Conn Deprecated: use github.com/libp2p/go-libp2p/core/network.Multiplexer instead.
MuxedConn represents a connection to a remote peer that has been extended to support stream multiplexing.
MuxedStream is a bidirectional io pipe within a connection.
NATDeviceType indicates the type of the NAT device.
NATTransportProtocol is the transport protocol for which the NAT Device Type has been determined.
Network is the interface used to connect to the outside world.
Deprecated: use github.com/libp2p/go-libp2p/core/network.NoopNotifiee instead.
Notifiee is an interface for an object wishing to receive notifications from a Network.
NotifyBundle implements Notifiee by calling any of the functions set on it, and nop'ing if they are unset.
PeerScope is the interface for peer resource scopes.
ProtocolScope is the interface for protocol resource scopes.
Reachability indicates how reachable a node is.
ResourceManager is the interface to the network resource management subsystem.
ResourceScope is the interface for all scopes.
ResourceScopeSpan is a ResourceScope with a delimited span.
ResourceScopeViewer is a mixin interface providing view methods for accessing top level scopes.
ScopeStat is a struct containing resource accounting information.
ServiceScope is the interface for service resource scopes Deprecated: use github.com/libp2p/go-libp2p/core/network.ServiceScope instead.
Stats stores metadata pertaining to a given Stream / Conn.
Stream represents a bidirectional channel between two agents in a libp2p network.
StreamHandler is the type of function used to listen for streams opened by the remote side.
StreamManagementScope is the interface for stream resource scopes.
StreamScope is the user view of a StreamScope.