discovery

package
v2.9.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 12, 2026 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceType = "_zaparoo._tcp"

ServiceType is the DNS-SD service type for Zaparoo Core.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service manages mDNS service advertising for network discovery. It allows mobile apps to discover Zaparoo Core instances without manual IP configuration.

func New

func New(cfg *config.Instance, platformID string) *Service

New creates a new discovery service.

func (*Service) InstanceName

func (s *Service) InstanceName() string

InstanceName returns the resolved mDNS instance name. Returns empty string if Start() has not been called.

func (*Service) Start

func (s *Service) Start() error

Start begins mDNS service advertising. If initial registration fails due to network unavailability, it starts a background retry loop. Returns an error only for permanent failures (e.g., disabled by config).

func (*Service) Stop

func (s *Service) Stop()

Stop gracefully shuts down mDNS advertising, sending goodbye packets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL