Documentation
¶
Overview ¶
Package server provides an embeddable Northstar DNS server with an explicit configuration struct and a Start/Reload/Shutdown lifecycle, replacing the former blocking, env-driven backend.StartDaemon entrypoint.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is an authoritative DNS server bound to one or more addresses, backed by a zone database synced from a filesystem dir or an S3 bucket.
func NewServer ¶
func NewServer(cfg config.ServerConfig) (*Server, error)
NewServer constructs a Server from explicit configuration. It does not bind any listeners or read any zones until Start is called.
func (*Server) Reload ¶
Reload re-reads all zones from the configured source and atomically swaps the in-memory zone database. On a source enumeration failure the existing zone DB is kept untouched, so a transient S3 outage cannot wipe authoritative data.
func (*Server) ReloadZone ¶
ReloadZone re-reads a single zone from the configured source and atomically swaps just that zone in the live database, leaving all other zones untouched. This is the control-plane fast-path: a record change is served immediately instead of after the SyncInterval poll, and the cost is one zone fetch rather than a full database rebuild.