Vellum/internal/core
mithral 795b77b709 Advertise Vellum over mDNS so clients find it without a typed URL
internal/discovery registers three service types on the listen port:
_vellum._tcp for native clients, and _jellyfin._tcp / _subsonic._tcp
because those ecosystems already have clients that browse the LAN. That
last part is the point: Infuse, Jellyfin Media Player and Symfonium can
find Vellum with no client-side work, because they are already looking for
those names.

TXT records carry api, ver, proto, types, tls and (when set) pub, so a
client that resolves one can tell what it found before connecting.

Definitions is a pure function of config and Start only registers what it
returns, so what is advertised is testable without a socket.

Two behaviours worth knowing:
- VELLUM_DISCOVERY=off stops advertising. It accepts off/no/false/0;
  strconv.ParseBool would have silently ignored "off".
- A loopback-only listen address advertises nothing. That is the normal
  shape behind a reverse proxy, and advertising it would put a port in the
  LAN browse list that refuses every client that dials it. Verified
  red-green: defeating the guard fails TestDefinitionsSkipsLoopbackListen.

zeroconf is the only new dependency. It logs to the stdlib logger, so a
host with no multicast-capable interface prints to stderr outside slog.

Not verified: real mDNS on a real LAN. There is no multicast here, so the
wire behaviour of zeroconf is untested - only the definitions it is handed.
2026-10-12 01:04:33 -04:00
..
config.go Advertise Vellum over mDNS so clients find it without a typed URL 2026-10-12 01:04:33 -04:00
config_test.go Advertise Vellum over mDNS so clients find it without a typed URL 2026-10-12 01:04:33 -04:00
db.go Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
logging.go Phase 0: skeleton, config, migrations, health check, container 2026-10-09 16:26:08 -04:00
migrate.go Refuse to start when the database is newer than the binary 2026-10-12 00:45:27 -04:00
migrate_test.go Refuse to start when the database is newer than the binary 2026-10-12 00:45:27 -04:00
stamp.go Wave 1: survive a real library 2026-10-11 13:10:34 -04:00
stamp_test.go Wave 1: survive a real library 2026-10-11 13:10:34 -04:00