Help us shape the future of Go! Take the 2026 Go Developer Survey

dns-config

command module
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

README

Build Status

DNS Config

General purpose tool for outputting or writing configuration files from DNS TXT or SRV entries.

It's goal is to allow a server image to be configured entirely from DNS data which you would have to run and create anyway in order for its network services to work.

Usage

dns-config assumes that the local hostname is not reliable by default. When run it will automatically discover the local IP addresses and attempt to reverse resolve them all against the default DNS server.

Valid hostnames are then queried recursively until a TXT record is found which includes the given configuration key. SRV records are also supported.

Example:

host.example.com $ dns-config key
value

Returns a TXT record found under the following domains by priority:

key.host.example.com
key.example.com
key.com

The depth of the search can be limited by use of command --required-suffix commandline option e.g. dns-config --required-suffix example.com would limit the search to go no further then key.example.com.

Multiple output formats are supported. The most powerful is json which allows key queries to fed directly into a templating engine for writing more sophisticated config files.

More Help

See the examples folder for a dockerfile and dnsmasq configuration which demonstrates some of the uses.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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