package
0.0.0-20220412220916-5ea02083e3ec
Repository: https://github.com/riteshrch/go-edge-device-lib.git
Documentation: pkg.go.dev

# Packages

No description provided by the author

# Functions

NewSwarm constructs a Swarm.
WithConnectionGater sets a connection gater.
No description provided by the author
No description provided by the author
WithMetrics sets a metrics reporter.
No description provided by the author

# Constants

ConcurrentFdDials is the number of concurrent outbound dials over transports that consume file descriptors.
DefaultPerPeerRateLimit is the number of concurrent outbound dials to make per peer.
DialAttempts governs how many times a goroutine will try to dial a given peer.

# Variables

BackoffBase is the base amount of time to backoff (default: 5s).
BackoffCoef is the backoff coefficient (default: 1s).
BackoffMax is the maximum backoff time (default: 5m).
ErrAddrFiltered is returned when trying to register a connection to a filtered address.
ErrAllDialsFailed is returned when connecting to a peer has ultimately failed.
ErrConnClosed is returned when operating on a closed connection.
ErrDialBackoff is returned by the backoff code when a given peer has been dialed too frequently.
ErrDialTimeout is returned when one a dial times out due to the global timeout.
ErrDialToSelf is returned if we attempt to dial our own peer.
ErrGaterDisallowedConnection is returned when the gater prevents us from forming a connection with a peer.
ErrNoAddresses is returned when we fail to find any addresses for a peer we're trying to dial.
ErrNoGoodAddresses is returned when we find addresses for a peer but can't use any of them.
ErrNoTransport is returned when we don't know a transport for the given multiaddr.
ErrSwarmClosed is returned when one attempts to operate on a closed swarm.

# Structs

Conn is the connection type used by swarm.
DialBackoff is a type for tracking peer dial backoffs.
DialError is the error type returned when dialing.
Stream is the stream type used by swarm.
Swarm is a connection muxer, allowing connections to other peers to be opened and closed, while still using the same Chan for all communication.
TransportError is the error returned when dialing a specific address.

# Type aliases

No description provided by the author