Documentation ¶
Index ¶
- Constants
- type Discovery
- type DiscoveryHost
- type Opt
- func AdvertiseForPeerDiscovery() Opt
- func DisableDHT() Opt
- func EnableRoutingDiscovery() Opt
- func Private() Opt
- func WithAdvertiseDelay(value time.Duration) Opt
- func WithAdvertiseInterval(value time.Duration) Opt
- func WithAdvertiseIntervalSpread(value time.Duration) Opt
- func WithAdvertiseRetryDelay(value time.Duration) Opt
- func WithBackup(backup []peer.AddrInfo) Opt
- func WithBootnodes(bootnodes []peer.AddrInfo) Opt
- func WithBootstrapDuration(bootstrapDuration time.Duration) Opt
- func WithConnBackoffTimings(minBackoff, maxBackoff, dialTimeout time.Duration) Opt
- func WithDir(path string) Opt
- func WithDiscoveryBackoff(backoff bool) Opt
- func WithDiscoveryBackoffTimings(minBackoff, maxBackoff time.Duration) Opt
- func WithFindPeersRetryDelay(value time.Duration) Opt
- func WithLogger(logger *zap.Logger) Opt
- func WithMinPeers(minPeers int) Opt
- func WithMode(mode dht.ModeOpt) Opt
- func WithPeriod(period time.Duration) Opt
- func WithRelayCandidateChannel(relayCh chan<- peer.AddrInfo) Opt
- func WithTimeout(timeout time.Duration) Opt
Constants ¶
View Source
const (
ProtocolID = protocolPrefix + "/kad/1.0.0"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Discovery ¶
type Discovery struct {
// contains filtered or unexported fields
}
type DiscoveryHost ¶ added in v1.3.0
type Opt ¶
type Opt func(*Discovery)
func AdvertiseForPeerDiscovery ¶ added in v1.3.0
func AdvertiseForPeerDiscovery() Opt
func DisableDHT ¶ added in v1.0.9
func DisableDHT() Opt
func EnableRoutingDiscovery ¶ added in v1.3.0
func EnableRoutingDiscovery() Opt
func WithAdvertiseDelay ¶ added in v1.3.6
func WithAdvertiseInterval ¶ added in v1.3.0
func WithAdvertiseIntervalSpread ¶ added in v1.4.5
func WithAdvertiseRetryDelay ¶ added in v1.3.6
func WithBackup ¶
func WithBootnodes ¶
func WithBootstrapDuration ¶
func WithConnBackoffTimings ¶ added in v1.6.0
func WithDiscoveryBackoff ¶ added in v1.6.0
func WithDiscoveryBackoffTimings ¶ added in v1.6.0
func WithFindPeersRetryDelay ¶ added in v1.3.6
func WithLogger ¶
func WithMinPeers ¶
func WithPeriod ¶
func WithRelayCandidateChannel ¶ added in v1.3.0
func WithTimeout ¶
Click to show internal directories.
Click to hide internal directories.