Skip to content

Commit

Permalink
lowcase id
Browse files Browse the repository at this point in the history
  • Loading branch information
guozy66 committed Jun 20, 2022
1 parent 5468f87 commit ab18cc2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nameresolution/consul/consul.go
Original file line number Diff line number Diff line change
Expand Up @@ -243,13 +243,13 @@ func getRegistrationConfig(cfg configSpec, props map[string]string) (*consul.Age
} else if _, err := strconv.ParseUint(httpPort, 10, 0); err != nil {
return nil, fmt.Errorf("error parsing %s: %w", nr.DaprHTTPPort, err)
}
ID := appID + "-" + host + "-" + httpPort
id := appID + "-" + host + "-" + httpPort
// if no health checks configured add dapr sidecar health check by default
if len(cfg.Checks) == 0 {
cfg.Checks = []*consul.AgentServiceCheck{
{
Name: "Dapr Health Status",
CheckID: fmt.Sprintf("daprHealth:%s", ID),
CheckID: fmt.Sprintf("daprHealth:%s", id),
Interval: "15s",
HTTP: fmt.Sprintf("http://%s:%s/v1.0/healthz", host, httpPort),
},
Expand All @@ -262,7 +262,7 @@ func getRegistrationConfig(cfg configSpec, props map[string]string) (*consul.Age
}

return &consul.AgentServiceRegistration{
ID: ID,
ID: id,
Name: appID,
Address: host,
Port: appPortInt,
Expand Down

0 comments on commit ab18cc2

Please sign in to comment.