moar usage

This commit is contained in:
Tero Marttila 2016-06-19 22:04:22 +03:00
parent 8eb6f8ab58
commit abd42f4bd1
2 changed files with 16 additions and 15 deletions

View File

@ -20,15 +20,15 @@ The DNS update requests are retried in the background (XXX: currently blocks for
-v, --verbose
--watch Watch for interface changes
-i, --interface=IFACE Use address from interface
--interface-family=ipv4|ipv6|all
--server=HOST[:PORT]
--timeout=DURATION
--retry=DURATION
--interface-family=ipv4|ipv6|all Limit to interface addreses of given family
--server=HOST[:PORT] Server for UPDATE query, default is discovered from zone SOA
--timeout=DURATION Timeout for sever queries (default: 10s)
--retry=DURATION Retry interval, increased for each retry attempt (default: 30s)
--tsig-name=FQDN
--tsig-secret=BASE-64
--tsig-secret=BASE-64 base64-encoded shared TSIG secret key [$TSIG_SECRET]
--tsig-algorithm=hmac-{md5,sha1,sha256,sha512}
--zone=FQDN Zone to update
--ttl=DURATION
--zone=FQDN Zone to update, default is derived from name
--ttl=DURATION TTL for updated records (default: 60s)
Help Options:
-h, --help Show this help message
@ -36,6 +36,7 @@ The DNS update requests are retried in the background (XXX: currently blocks for
Arguments:
Name: DNS Name to update
## Example
# Using a generated TSIG key:

16
main.go
View File

@ -12,20 +12,20 @@ type Options struct {
Watch bool `long:"watch" description:"Watch for interface changes"`
Interface string `long:"interface" short:"i" value-name:"IFACE" description:"Use address from interface"`
InterfaceFamily Family `long:"interface-family" value-name:"ipv4|ipv6|all"`
InterfaceFamily Family `long:"interface-family" value-name:"ipv4|ipv6|all" description:"Limit to interface addreses of given family"`
Server string `long:"server" value-name:"HOST[:PORT]"`
Timeout time.Duration `long:"timeout" value-name:"DURATION" default:"10s"`
Retry time.Duration `long:"retry" value-name:"DURATION" default:"30s"`
Server string `long:"server" value-name:"HOST[:PORT]" description:"Server for UPDATE query, default is discovered from zone SOA"`
Timeout time.Duration `long:"timeout" value-name:"DURATION" default:"10s" description:"Timeout for sever queries"`
Retry time.Duration `long:"retry" value-name:"DURATION" default:"30s" description:"Retry interval, increased for each retry attempt"`
TSIGName string `long:"tsig-name" value-name:"FQDN"`
TSIGSecret string `long:"tsig-secret" value-name:"BASE-64" env:"TSIG_SECRET"`
TSIGSecret string `long:"tsig-secret" value-name:"BASE-64" env:"TSIG_SECRET" description:"base64-encoded shared TSIG secret key"`
TSIGAlgorithm TSIGAlgorithm `long:"tsig-algorithm" value-name:"hmac-{md5,sha1,sha256,sha512}" default:"hmac-sha1."`
Zone string `long:"zone" value-name:"FQDN" description:"Zone to update"`
TTL time.Duration `long:"ttl" value-name:"DURATION" default:"60s"`
Zone string `long:"zone" value-name:"FQDN" description:"Zone to update, default is derived from name"`
TTL time.Duration `long:"ttl" value-name:"DURATION" default:"60s" description:"TTL for updated records"`
Args struct {
Name string `description:"DNS Name to update"`
Name string `value-name:"FQDN" description:"DNS Name to update"`
} `positional-args:"yes"`
}