Skip to content

Commit 09bc239

Browse files
okJiangJmPotato
andcommitted
Apply suggestions from code review
Co-authored-by: JmPotato <[email protected]> Signed-off-by: okJiang <[email protected]>
1 parent 27a74a5 commit 09bc239

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

Diff for: client/http/interface.go

+1
Original file line numberDiff line numberDiff line change
@@ -338,6 +338,7 @@ func (c *client) SetStoreLabels(ctx context.Context, storeID int64, storeLabels
338338
WithBody(jsonInput))
339339
}
340340

341+
// GetHealthStatus gets the health status of the cluster.
341342
func (c *client) GetHealthStatus(ctx context.Context) ([]Health, error) {
342343
var healths []Health
343344
err := c.request(ctx, newRequestInfo().

Diff for: tools/pd-ctl/pdctl/command/health_command.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ func NewHealthCommand() *cobra.Command {
3232
}
3333

3434
func showHealthCommandFunc(cmd *cobra.Command, _ []string) {
35-
health, err := PDCli.GetHealthStatus(context.Background())
35+
health, err := PDCli.GetHealthStatus(cmd.Context())
3636
if err != nil {
3737
cmd.Println(err)
3838
return

0 commit comments

Comments
 (0)