Clarify network-related flags in the master

Rename and rejigger flags to make it more obvious what is happening.  Change
the default listen from ChooseHostInterface() to 0.0.0.0.
This commit is contained in:
Tim Hockin
2015-04-07 11:49:08 -07:00
parent c50355e34f
commit f2c8decffe
2 changed files with 38 additions and 31 deletions

View File

@@ -211,7 +211,9 @@ func setDefaults(c *Config) {
if c.CacheTimeout == 0 {
c.CacheTimeout = 5 * time.Second
}
for c.PublicAddress == nil {
for c.PublicAddress == nil || c.PublicAddress.IsUnspecified() {
// TODO: This should be done in the caller and just require a
// valid value to be passed in.
hostIP, err := util.ChooseHostInterface()
if err != nil {
glog.Fatalf("Unable to find suitable network address.error='%v' . "+