Documentation ¶
Index ¶
- type DiscoveryV5
- func (d *DiscoveryV5) Advertise(ctx context.Context, ns string, opts ...discovery.Option) (time.Duration, error)
- func (d *DiscoveryV5) FindPeers(ctx context.Context, topic string, opts ...discovery.Option) (<-chan peer.AddrInfo, error)
- func (d *DiscoveryV5) Start() error
- func (d *DiscoveryV5) Stop()
- type DiscoveryV5Option
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DiscoveryV5 ¶
type DiscoveryV5 struct { sync.Mutex discovery.Discovery NAT nat.Interface // contains filtered or unexported fields }
func NewDiscoveryV5 ¶
func NewDiscoveryV5(host host.Host, priv *ecdsa.PrivateKey, localnode *enode.LocalNode, log *zap.Logger, opts ...DiscoveryV5Option) (*DiscoveryV5, error)
func (*DiscoveryV5) Start ¶
func (d *DiscoveryV5) Start() error
func (*DiscoveryV5) Stop ¶
func (d *DiscoveryV5) Stop()
type DiscoveryV5Option ¶
type DiscoveryV5Option func(*discV5Parameters)
func DefaultOptions ¶
func DefaultOptions() []DiscoveryV5Option
func WithAdvertiseAddr ¶
func WithAdvertiseAddr(addr net.IP) DiscoveryV5Option
func WithAutoUpdate ¶
func WithAutoUpdate(autoUpdate bool) DiscoveryV5Option
func WithBootnodes ¶
func WithBootnodes(bootnodes []*enode.Node) DiscoveryV5Option
func WithUDPPort ¶
func WithUDPPort(port int) DiscoveryV5Option
Click to show internal directories.
Click to hide internal directories.