watchtower: rename DefaultPeerPortStr -> DefaultListenAddr
This commit is contained in:
parent
b98bc76878
commit
7e81a5144e
@ -1,6 +1,7 @@
|
|||||||
package watchtower
|
package watchtower
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"strconv"
|
||||||
"time"
|
"time"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -36,7 +37,7 @@ func (c *Conf) Apply(cfg *Config,
|
|||||||
// If no addresses are specified by the Config, we will resort
|
// If no addresses are specified by the Config, we will resort
|
||||||
// to the default peer port.
|
// to the default peer port.
|
||||||
if len(c.RawListeners) == 0 {
|
if len(c.RawListeners) == 0 {
|
||||||
addr := DefaultPeerPortStr
|
addr := DefaultListenAddr
|
||||||
c.RawListeners = append(c.RawListeners, addr)
|
c.RawListeners = append(c.RawListeners, addr)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -44,7 +45,7 @@ func (c *Conf) Apply(cfg *Config,
|
|||||||
// used by the brontide listener.
|
// used by the brontide listener.
|
||||||
var err error
|
var err error
|
||||||
cfg.ListenAddrs, err = normalizer(
|
cfg.ListenAddrs, err = normalizer(
|
||||||
c.RawListeners, DefaultPeerPortStr,
|
c.RawListeners, strconv.Itoa(DefaultPeerPort),
|
||||||
cfg.Net.ResolveTCPAddr,
|
cfg.Net.ResolveTCPAddr,
|
||||||
)
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -28,8 +28,9 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
// DefaultPeerPortStr is the default server port as a string.
|
// DefaultListenAddr is the default watchtower address listening on all
|
||||||
DefaultPeerPortStr = fmt.Sprintf(":%d", DefaultPeerPort)
|
// interfaces.
|
||||||
|
DefaultListenAddr = fmt.Sprintf(":%d", DefaultPeerPort)
|
||||||
)
|
)
|
||||||
|
|
||||||
// Config defines the resources and parameters used to configure a Watchtower.
|
// Config defines the resources and parameters used to configure a Watchtower.
|
||||||
|
Loading…
Reference in New Issue
Block a user