Versions in this module Expand all Collapse all v1 v1.3.1 Dec 27, 2023 v1.3.0 Dec 23, 2022 Changes in this version + type DHT struct + func New(host host.Host, logger api.Logger, opts ...Option) (*DHT, error) + func (d *DHT) AddToTable(serviceName string, peerInfo *pb.PeerInfo) (bool, error) + func (d *DHT) Announce(_ context.Context, serviceName string, _ ...discovery.Option) error + func (d *DHT) FindPeerSupportProtocolsAsync(context.Context, int, ...protocol.ID) <-chan peer.AddrInfo + func (d *DHT) FindPeers(ctx context.Context, serviceName string, opts ...discovery.Option) (<-chan ma.Multiaddr, error) + func (d *DHT) PeerConnected(pid peer.ID) + func (d *DHT) PeerDisconnected(pid peer.ID) + func (d *DHT) PeerProtocolSupported(protocolID protocol.ID, pid peer.ID) + func (d *DHT) PeerProtocolUnsupported(protocolID protocol.ID, pid peer.ID) + func (d *DHT) SendMessage(ctx context.Context, service string, protocolID protocol.ID, ...) (peer.AddrInfo, error) + type MessageRoutingMsgMgr struct + type Option func(*config) error + func WithBucketSize(bucketSize int) Option + func WithFarPeerRate(farPeerRate float32) Option + func WithFindingInterval(interval time.Duration) Option + func WithHeartbeatCheckInterval(heartbeatCheckInterval int) Option + func WithHeartbeatInterval(heartbeatInterval int) Option + func WithMessageRoutingCacheMaxSize(msgCacheMaxSize int) Option + func WithMessageRoutingEnable(enable bool) Option + func WithMessageRoutingForwardPeerCount(forwardPeerCount int) Option + func WithMessageRoutingMsgLifetime(lifetime int) Option + func WithMinConnectRate(minConnectRate float32) Option + func WithPeerTimeoutInterval(peerTimeoutInterval int) Option + func WithRoutingTableRefreshInterval(refreshInterval time.Duration) Option + func WithRoutingTableRefreshQueryTimeout(timeout time.Duration) Option + func WithVerifyPeerFunc(verifyPeer func(peerId peer.ID, chainId string) (bool, error)) Option