Versions in this module Expand all Collapse all v0 v0.0.1 Nov 2, 2025 Changes in this version + type Config struct + BindIP net.IP + BindPort int + BootNodes []*node.Node + CLConfig *config.Config + ENRIP net.IP + ENRIP6 net.IP + ENRPort int + EnableIPDiscovery bool + GracePeriod time.Duration + Logger logrus.FieldLogger + MaxFailures int + MaxNodeAge time.Duration + MaxNodesPerIP int + MaxSessions int + NodeDB *nodedb.NodeDB + PingInterval time.Duration + PrivateKey *ecdsa.PrivateKey + SessionLifetime time.Duration + func DefaultConfig() *Config + type HandlerStats struct + FilteredResponses int + FindNodeReceived int + InvalidPackets int + PacketsReceived int + PacketsSent int + PendingChallenges int + PendingHandshakes int + type Service struct + func New(cfg *Config) (*Service, error) + func (s *Service) CheckAndAddNode(n *node.Node) bool + func (s *Service) Discv5Service() *discv5.Service + func (s *Service) ForkFilter() *config.ForkDigestFilter + func (s *Service) GetAcceptedCurrent() int + func (s *Service) GetAcceptedOld() int + func (s *Service) GetActiveNodes() []*node.Node + func (s *Service) GetCurrentDigest() string + func (s *Service) GetCurrentFork() string + func (s *Service) GetGracePeriod() string + func (s *Service) GetNetworkName() string + func (s *Service) GetOldDigests() map[string]time.Duration + func (s *Service) GetRejectedExpired() int + func (s *Service) GetRejectedInvalid() int + func (s *Service) GetStats() ServiceStats + func (s *Service) GetTotalChecks() int + func (s *Service) LocalNode() *node.Node + func (s *Service) Lookup(ctx context.Context, target node.ID) ([]*node.Node, error) + func (s *Service) LookupWithFilter(ctx context.Context, target node.ID, k int, filter enr.ENRFilter) ([]*node.Node, error) + func (s *Service) NodeDB() *nodedb.NodeDB + func (s *Service) Ping(n *node.Node) (bool, time.Duration, error) + func (s *Service) PingMultiple(nodes []*node.Node) map[node.ID]bool + func (s *Service) RandomWalk(ctx context.Context) ([]*node.Node, error) + func (s *Service) Start() error + func (s *Service) Stop() error + func (s *Service) Table() *table.FlatTable + type ServiceStats struct + ActiveNodes int + BindAddress string + BucketsFilled int + ForkFilter *config.ForkFilterStats + HandlerStats HandlerStats + InactiveNodes int + LookupStats discover.LookupStats + NodeDBStats nodedb.NodeDBStats + PeerID string + PingStats discover.PingStats + SessionStats SessionStats + TableSize int + TableStats table.TableStats + Uptime time.Duration + type SessionStats struct + Active int + Expired int + Total int