Versions in this module Expand all Collapse all v1 v1.7.1 Jan 29, 2021 v1.7.0 Dec 8, 2020 Changes in this version + const AutoNATProto + func IsDialError(e error) bool + func IsDialRefused(e error) bool + type AddrFunc func() []ma.Multiaddr + type AmbientAutoNAT struct + func (as *AmbientAutoNAT) ClosedStream(net network.Network, s network.Stream) + func (as *AmbientAutoNAT) Connected(net network.Network, c network.Conn) + func (as *AmbientAutoNAT) Disconnected(net network.Network, c network.Conn) + func (as *AmbientAutoNAT) Listen(net network.Network, a ma.Multiaddr) + func (as *AmbientAutoNAT) ListenClose(net network.Network, a ma.Multiaddr) + func (as *AmbientAutoNAT) OpenedStream(net network.Network, s network.Stream) + func (as *AmbientAutoNAT) PublicAddr() (ma.Multiaddr, error) + func (as *AmbientAutoNAT) Status() network.Reachability + type AutoNAT interface + PublicAddr func() (ma.Multiaddr, error) + Status func() network.Reachability + func New(ctx context.Context, h host.Host, options ...Option) (AutoNAT, error) + type Client interface + DialBack func(ctx context.Context, p peer.ID) (ma.Multiaddr, error) + func NewAutoNATClient(h host.Host, addrFunc AddrFunc) Client + type Error struct + Status pb.Message_ResponseStatus + Text string + func (e Error) Error() string + func (e Error) IsDialError() bool + func (e Error) IsDialRefused() bool + type Option func(*config) error + func EnableService(dialer network.Network) Option + func UsingAddresses(addrFunc AddrFunc) Option + func WithPeerThrottling(amount int) Option + func WithReachability(reachability network.Reachability) Option + func WithSchedule(retryInterval, refreshInterval time.Duration) Option + func WithThrottling(amount int, interval time.Duration) Option + func WithoutStartupDelay() Option + func WithoutThrottling() Option + type StaticAutoNAT struct + func (s *StaticAutoNAT) PublicAddr() (ma.Multiaddr, error) + func (s *StaticAutoNAT) Status() network.Reachability