mirror of
https://gitee.com/rainbond/Rainbond.git
synced 2024-12-04 04:38:04 +08:00
Merge branch 'V5.2' into V5.2
This commit is contained in:
commit
472b6878bb
@ -184,7 +184,7 @@ func (d *Monitor) discoverEtcd(e *callback.Etcd, done <-chan struct{}) {
|
|||||||
|
|
||||||
endpoints := make([]*config.Endpoint, 0, 5)
|
endpoints := make([]*config.Endpoint, 0, 5)
|
||||||
for _, member := range resp.Members {
|
for _, member := range resp.Members {
|
||||||
if len(member.ClientURLs) > 1 {
|
if len(member.ClientURLs) >= 1 {
|
||||||
url := member.ClientURLs[0]
|
url := member.ClientURLs[0]
|
||||||
end := &config.Endpoint{
|
end := &config.Endpoint{
|
||||||
URL: url,
|
URL: url,
|
||||||
@ -192,7 +192,7 @@ func (d *Monitor) discoverEtcd(e *callback.Etcd, done <-chan struct{}) {
|
|||||||
endpoints = append(endpoints, end)
|
endpoints = append(endpoints, end)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logrus.Debugf("etcd endpoints: %+v", endpoints)
|
||||||
e.UpdateEndpoints(endpoints...)
|
e.UpdateEndpoints(endpoints...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user