Browse Source

Merge branch 'docs'

Ask Bjørn Hansen 10 years ago
parent
commit
b2c16f8ad3
2 changed files with 46 additions and 4 deletions
  1. 45 3
      README.md
  2. 1 1
      zone.go

+ 45 - 3
README.md

@@ -112,6 +112,8 @@ GeoDNS can post runtime data to [StatHat](http://www.stathat.com/).
 
 
 ## Country and continent lookups
 ## Country and continent lookups
 
 
+See zone targeting options below.
+
 ## Weighted records
 ## Weighted records
 
 
 Most records can have a 'weight' assigned. If any records of a particular type
 Most records can have a 'weight' assigned. If any records of a particular type
@@ -131,10 +133,19 @@ As an example, if you configure
 
 
 with `max_hosts` 2 then .4 will be returned about 4 times more often than .1.
 with `max_hosts` 2 then .4 will be returned about 4 times more often than .1.
 
 
-## Configuration format
+## Configuration file
+
+The geodns.conf file allows you to specify a specific directory for the GeoIP
+data files and enable posting metrics to StatHat. See the `geodns.conf.sample`
+file for example configuration.
+
+Most of the configuration is "per zone" and done in the zone .json files.
 
 
-In the configuration file the whole zone is a big hash (associative array). At the
-top level you can (optionally) set some options with the keys serial, ttl and max_hosts.
+## Zone format
+
+In the zone configuration file the whole zone is a big hash (associative array).
+At the top level you can (optionally) set some options with the keys serial,
+ttl and max_hosts.
 
 
 The actual zone data (dns records) is in a hash under the key "data". The keys
 The actual zone data (dns records) is in a hash under the key "data". The keys
 in the hash are hostnames and the value for each hostname is yet another hash
 in the hash are hostnames and the value for each hostname is yet another hash
@@ -162,6 +173,37 @@ The configuration files are automatically reloaded when they're updated. If a fi
 can't be read (invalid JSON, for example) the previous configuration for that zone
 can't be read (invalid JSON, for example) the previous configuration for that zone
 will be kept.
 will be kept.
 
 
+## Zone options
+
+* serial
+
+GeoDNS doesn't support zone transfers (AXFR), so the serial number is only used
+for debugging and monitoring. The default is the 'last modified' timestamp of
+the zone file.
+
+* ttl
+
+Set the default TTL for the zone (default 120).
+
+* targeting
+
+* max_hosts
+
+
+
+* contact
+
+Set the soa 'contact' field (default is "hostmaster.$domain").
+
+## Zone targeting options
+
+@
+
+country
+continent
+
+region and regiongroup
+
 ## Supported record types
 ## Supported record types
 
 
 Each label has a hash (object/associative array) of record data, the keys are the type.
 Each label has a hash (object/associative array) of record data, the keys are the type.

+ 1 - 1
zone.go

@@ -73,7 +73,7 @@ func NewZone(name string) *Zone {
 	// defaults
 	// defaults
 	zone.Options.Ttl = 120
 	zone.Options.Ttl = 120
 	zone.Options.MaxHosts = 2
 	zone.Options.MaxHosts = 2
-	zone.Options.Contact = "support.bitnames.com"
+	zone.Options.Contact = "hostmaster." + name
 	zone.Options.Targeting = TargetGlobal + TargetCountry + TargetContinent
 	zone.Options.Targeting = TargetGlobal + TargetCountry + TargetContinent
 
 
 	return zone
 	return zone