Revert "Manages segments list via a pointer."
This reverts commit c277a4250461443cbd63de0259e5e32766f651ea.
This commit is contained in:
parent
5008aabb62
commit
8be4ee766a
|
@ -783,10 +783,10 @@ func (a *Agent) consulConfig() (*consul.Config, error) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup the serf and memberlist config for any defined network segments.
|
// Setup the serf and memberlist config for any defined network segments.
|
||||||
func (a *Agent) segmentConfig() ([]*consul.NetworkSegment, error) {
|
func (a *Agent) segmentConfig() ([]consul.NetworkSegment, error) {
|
||||||
|
var segments []consul.NetworkSegment
|
||||||
config := a.config
|
config := a.config
|
||||||
|
|
||||||
var segments []*consul.NetworkSegment
|
|
||||||
for _, segment := range config.Segments {
|
for _, segment := range config.Segments {
|
||||||
serfConf := consul.DefaultConfig().SerfLANConfig
|
serfConf := consul.DefaultConfig().SerfLANConfig
|
||||||
|
|
||||||
|
@ -821,7 +821,7 @@ func (a *Agent) segmentConfig() ([]*consul.NetworkSegment, error) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
segments = append(segments, &consul.NetworkSegment{
|
segments = append(segments, consul.NetworkSegment{
|
||||||
Name: segment.Name,
|
Name: segment.Name,
|
||||||
Bind: serfConf.MemberlistConfig.BindAddr,
|
Bind: serfConf.MemberlistConfig.BindAddr,
|
||||||
Port: segment.Port,
|
Port: segment.Port,
|
||||||
|
|
|
@ -122,7 +122,7 @@ type Config struct {
|
||||||
|
|
||||||
// (Enterprise-only) Segments is a list of network segments for a server to
|
// (Enterprise-only) Segments is a list of network segments for a server to
|
||||||
// bind on.
|
// bind on.
|
||||||
Segments []*NetworkSegment
|
Segments []NetworkSegment
|
||||||
|
|
||||||
// SerfLANConfig is the configuration for the intra-dc serf
|
// SerfLANConfig is the configuration for the intra-dc serf
|
||||||
SerfLANConfig *serf.Config
|
SerfLANConfig *serf.Config
|
||||||
|
|
Loading…
Reference in New Issue