Skip to content

Commit

Permalink
Merge 06746f4 into a11bd32
Browse files Browse the repository at this point in the history
  • Loading branch information
AstroProfundis authored Oct 13, 2021
2 parents a11bd32 + 06746f4 commit 7864480
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/cluster/api/pdapi.go
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ func (pc *PDClient) GetConfig() (map[string]interface{}, error) {
}

// GetClusterID return cluster ID
func (pc *PDClient) GetClusterID() (string, error) {
func (pc *PDClient) GetClusterID() (int64, error) {
endpoints := pc.getEndpoints(pdClusterIDURI)
clusterID := map[string]interface{}{}

Expand All @@ -355,10 +355,10 @@ func (pc *PDClient) GetClusterID() (string, error) {
return body, json.Unmarshal(body, &clusterID)
})
if err != nil {
return "", err
return 0, err
}

return fmt.Sprintf("%.0f", clusterID["id"]), nil
return int64(clusterID["id"].(float64)), nil
}

// GetDashboardAddress get the PD node address which runs dashboard
Expand Down

0 comments on commit 7864480

Please sign in to comment.