Discovery Nats automate
This commit is contained in:
parent
6c28684859
commit
fb555be86c
@ -56,8 +56,8 @@ func (p *PeerCache) checkPeerStatus(peerID string, caller *tools.HTTPCaller) boo
|
||||
url = strings.ReplaceAll(url, "localhost", utils.PEER.API())
|
||||
url = strings.ReplaceAll(url, "127.0.0.1", utils.PEER.API())
|
||||
r := regexp.MustCompile("(:[0-9]+)")
|
||||
ttt := r.FindAllString(url, -1)
|
||||
for _, t := range ttt {
|
||||
t := r.FindString(url)
|
||||
if t != "" {
|
||||
url = strings.Replace(url, t, ":8080", -1)
|
||||
}
|
||||
r.ReplaceAllString(url, ":8080")
|
||||
@ -82,8 +82,8 @@ func (p *PeerCache) LaunchPeerExecution(peerID string, isMySelf bool, dataID str
|
||||
url = strings.ReplaceAll(url, "localhost", dt.API())
|
||||
url = strings.ReplaceAll(url, "127.0.0.1", dt.API())
|
||||
r := regexp.MustCompile("(:[0-9]+)")
|
||||
ttt := r.FindAllString(url, -1)
|
||||
for _, t := range ttt {
|
||||
t := r.FindString(url)
|
||||
if t != "" {
|
||||
url = strings.Replace(url, t, ":8080", -1)
|
||||
}
|
||||
r.ReplaceAllString(url, ":8080")
|
||||
|
Loading…
Reference in New Issue
Block a user