How stackexchange/dnscontrol works
DNSControl is DNS infrastructure-as-code: users describe zones in a JavaScript-compatible configuration, preview changes against DNS providers, then push approved corrections. The graph includes configuration parsing and normalization, provider integration, and the separate interactive initialization capability documented in the README. Several runtime paths are represented from documentation because their implementation was not excerpted; those links are dashed and unverified.
Main entry points: ppreviewPush.go Preview and push · providers DNS provider adapters · main.go Command dispatcher · init.go Setup wizard
Components 16
CLI workflows
- Command dispatcher
main.go - Setup wizard
commands/init.go - Preview and push
commands/ppreviewPush.go
Configuration and records
- JS configuration
pkg/js/js.go - Zone model
models/domain.go - DNS records
models/record.go - Normalize and validate
pkg/normalize/validate.go
Planning and providers
- Provider registry
pkg/providers/providers.go - Change analysis
pkg/diff2/diff2.go - Correction runner
commands/ppreviewPush.go
Provider services
- DNS provider adapters
providers - Registrar adapters
providers
Other components
- DNS operator
- DNS provider APIs
- Registrar APIs
- Credentials file
Connections 17
- DNS operator → Command dispatcher: runs
README.md - Command dispatcher → Preview and push: dispatches
main.go - Command dispatcher → Setup wizard: dispatches
- DNS operator → JS configuration: defines zones
README.md - JS configuration → Zone model: produces config
- Zone model → DNS records: holds records
- Preview and push → Normalize and validate: normalizes config
commands/ppreviewPush.go - Preview and push → Provider registry: creates providers
- Preview and push → DNS provider adapters: queries zones
README.md - DNS provider adapters → DNS provider APIs: reads current state
README.md - Preview and push → Registrar adapters: checks delegation
commands/ppreviewPush.go - Registrar adapters → Registrar APIs: manages delegation
- DNS provider adapters → Change analysis: analyzes changes
providers/route53/route53Provider.go - Preview and push → Correction runner: coordinates
commands/ppreviewPush.go - Correction runner → DNS provider adapters: applies corrections
README.md - Setup wizard → Credentials file: writes credentials
README.md - Setup wizard → DNS provider adapters: imports existing zones
README.md