discovery

package
v0.1.13 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: AGPL-3.0 Imports: 6 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package discovery announces a Matinee server on the local network with DNS-SD over multicast DNS, so the apps can list it without anyone typing an address.

Index

Constants

View Source
const Service = "_matinee._tcp"

Service is the DNS-SD service type the apps browse for.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, a Announcement, log *slog.Logger) error

Run announces a until ctx ends.

Types

type Announcement

type Announcement struct {
	Name    string // shown in the list, such as "Matinee"
	Port    int    // where this host serves Matinee
	URL     string // optional: the server's address away from home
	Version string
	UUID    string // the server's own id (api.ServerUUID)
	// Home means this host's IP and Port reach Matinee directly from the home
	// network, so devices there can use it without signing in. Otherwise
	// apps connect to URL.
	Home bool
}

Announcement is what the apps see in their list of servers nearby.

func (Announcement) TXT

func (a Announcement) TXT() []string

TXT is the record the apps read: who's answering, and where to connect.

Jump to

Keyboard shortcuts

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