mirror of
https://github.com/kemko/nomad.git
synced 2026-01-06 18:35:44 +03:00
Add error handling to check registration
This commit is contained in:
@@ -707,7 +707,11 @@ func (c *Syncer) createCheckReg(check *structs.ServiceCheck, serviceReg *consul.
|
||||
Scheme: check.Protocol,
|
||||
Host: net.JoinHostPort(host, strconv.Itoa(port)),
|
||||
}
|
||||
url := base.ResolveReference(url.Parse(check.Path))
|
||||
relative, err := url.Parse(check.Path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
url := base.ResolveReference(relative)
|
||||
chkReg.HTTP = url.String()
|
||||
case structs.ServiceCheckTCP:
|
||||
chkReg.TCP = net.JoinHostPort(host, strconv.Itoa(port))
|
||||
|
||||
Reference in New Issue
Block a user