|
|
@ -132,6 +132,8 @@ func (c *Client) Register(_ context.Context, svc *registry.ServiceInstance, enab |
|
|
|
Timeout: "5s", |
|
|
|
Timeout: "5s", |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
// custom checks
|
|
|
|
|
|
|
|
asr.Checks = append(asr.Checks, c.serviceChecks...) |
|
|
|
} |
|
|
|
} |
|
|
|
if c.heartbeat { |
|
|
|
if c.heartbeat { |
|
|
|
asr.Checks = append(asr.Checks, &api.AgentServiceCheck{ |
|
|
|
asr.Checks = append(asr.Checks, &api.AgentServiceCheck{ |
|
|
@ -141,9 +143,6 @@ func (c *Client) Register(_ context.Context, svc *registry.ServiceInstance, enab |
|
|
|
}) |
|
|
|
}) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// custom checks
|
|
|
|
|
|
|
|
asr.Checks = append(asr.Checks, c.serviceChecks...) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
err := c.cli.Agent().ServiceRegister(asr) |
|
|
|
err := c.cli.Agent().ServiceRegister(asr) |
|
|
|
if err != nil { |
|
|
|
if err != nil { |
|
|
|
return err |
|
|
|
return err |
|
|
|