Versions in this module Expand all Collapse all v0 v0.1.1 May 17, 2026 v0.1.0 Feb 4, 2026 Changes in this version + const DefaultBrowseInterval + const DefaultBrowseTimeout + const DefaultDomain + const DefaultStaleTimeout + func LocalIPs() []net.IP + type Discovery struct + func New(serviceType, nodeID string, port int, opts ...Option) *Discovery + func (d *Discovery) NodeID() string + func (d *Discovery) OnPeer(handler PeerHandler) + func (d *Discovery) Peer(nodeID string) *Peer + func (d *Discovery) PeerCount() int + func (d *Discovery) Peers() []*Peer + func (d *Discovery) ServiceType() string + func (d *Discovery) Start() error + func (d *Discovery) Stop() + type Option func(*Discovery) + func WithBrowseInterval(interval time.Duration) Option + func WithBrowseTimeout(timeout time.Duration) Option + func WithLogger(logger *slog.Logger) Option + func WithMetadata(metadata map[string]string) Option + func WithStaleTimeout(timeout time.Duration) Option + type Peer struct + Addr string + LastSeen time.Time + Metadata map[string]string + NodeID string + Port int + func (p *Peer) Address() string + func (p *Peer) Age() time.Duration + func (p *Peer) Clone() *Peer + func (p *Peer) Get(key string) string + type PeerHandler func(peer *Peer, joined bool)