Documentation
¶
Overview ¶
Package updater implements the core DNS update flow shared by the cron path (cmd/update.go) and the serve handler (internal/server).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DNSClient ¶
type DNSClient interface {
GetCurrentIP(ctx context.Context) (string, error)
UpdateIP(ctx context.Context, newIP string) error
}
DNSClient is the subset of internal/dns.Route53Client that the updater exercises. Declaring it here lets tests inject a mock without constructing a real AWS client. dns.Route53Client satisfies this interface.
type Options ¶
type Options struct {
Force bool
DryRun bool
Quiet bool
Verbose bool // emit per-step diagnostic output (source choice, interface, TTL)
OverrideIP string // empty = resolve via myip.GetPublicIP (default cron behavior)
// Client, if set, replaces the Route53 client the updater would otherwise
// construct from cfg. Intended for tests and for the serve handler.
Client DNSClient
}
Options controls a single update run.
Click to show internal directories.
Click to hide internal directories.