Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: JmPotato <[email protected]>
Signed-off-by: okJiang <[email protected]>
  • Loading branch information
okJiang and JmPotato committed May 23, 2024
1 parent 27a74a5 commit 09bc239
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions client/http/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,7 @@ func (c *client) SetStoreLabels(ctx context.Context, storeID int64, storeLabels
WithBody(jsonInput))
}

// GetHealthStatus gets the health status of the cluster.
func (c *client) GetHealthStatus(ctx context.Context) ([]Health, error) {
var healths []Health
err := c.request(ctx, newRequestInfo().
Expand Down
2 changes: 1 addition & 1 deletion tools/pd-ctl/pdctl/command/health_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func NewHealthCommand() *cobra.Command {
}

func showHealthCommandFunc(cmd *cobra.Command, _ []string) {
health, err := PDCli.GetHealthStatus(context.Background())
health, err := PDCli.GetHealthStatus(cmd.Context())
if err != nil {
cmd.Println(err)
return
Expand Down

0 comments on commit 09bc239

Please sign in to comment.