Skip to content

Commit

Permalink
change api
Browse files Browse the repository at this point in the history
Signed-off-by: husharp <jinhao.hu@pingcap.com>
  • Loading branch information
HuSharp committed Apr 1, 2024
1 parent 6594da2 commit b488bf0
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 @@ -139,7 +139,7 @@ var (
pdStoresURI = "pd/api/v1/stores"
pdStoresLimitURI = "pd/api/v1/stores/limit"
pdRegionsCheckURI = "pd/api/v1/regions/check"
pdMSHealthPrefix = "api/v1/health"
tsoHealthPrefix = "tso/api/v1/health"
)

func tryURLs(endpoints []string, f func(endpoint string) ([]byte, error)) ([]byte, error) {
Expand Down Expand Up @@ -199,9 +199,9 @@ func (pc *PDClient) CheckHealth() error {
return nil
}

// CheckTSOHealth checks the health of TSO service
// CheckTSOHealth checks the health of TSO service(which is a Micro Service component of PD)
func (pc *PDClient) CheckTSOHealth(retryOpt *utils.RetryOption) error {
servicePrefix := fmt.Sprintf("tso/%s", pdMSHealthPrefix)
servicePrefix := fmt.Sprintf("tso/%s", tsoHealthPrefix)
endpoints := pc.getEndpoints(servicePrefix)

if err := utils.Retry(func() error {
Expand Down

0 comments on commit b488bf0

Please sign in to comment.