Skip to content

Commit

Permalink
format the code
Browse files Browse the repository at this point in the history
Signed-off-by: Boyang Lyu <[email protected]>
  • Loading branch information
JackL9u committed Aug 8, 2024
1 parent 637c50c commit 002862c
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
16 changes: 8 additions & 8 deletions client/http/interface.go
Original file line number Diff line number Diff line change
Expand Up @@ -1031,10 +1031,10 @@ func (c *client) GetKeyspaceMetaByName(ctx context.Context, keyspaceName string)
func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, error) {
var gcSafePoint ListServiceGCSafepoint
err := c.request(ctx, newRequestInfo().
WithName(GetGCSafePointName).
WithURI(safepoint).
WithMethod(http.MethodGet).
WithResp(&gcSafePoint))
WithName(GetGCSafePointName).
WithURI(safepoint).
WithMethod(http.MethodGet).
WithResp(&gcSafePoint))
if err != nil {
return gcSafePoint, err
}
Expand All @@ -1045,10 +1045,10 @@ func (c *client) GetGCSafePoint(ctx context.Context) (ListServiceGCSafepoint, er
func (c *client) DeleteGCSafePoint(ctx context.Context, serviceId string) (string, error) {
var msg string
err := c.request(ctx, newRequestInfo().
WithName(DeleteGCSafePointName).
WithURI(safepoint+"/"+serviceId).
WithMethod(http.MethodDelete).
WithResp(&msg))
WithName(DeleteGCSafePointName).
WithURI(safepoint+"/"+serviceId).
WithMethod(http.MethodDelete).
WithResp(&msg))
if err != nil {
return msg, err
}
Expand Down
8 changes: 4 additions & 4 deletions client/http/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,11 @@ type ServiceSafePoint struct {
SafePoint uint64 `json:"safe_point"`
}

// NOTE: This type is in sync with pd/server/spi/service_gc_safepoint.go
// NOTE: This type is in sync with pd/server/spi/service_gc_safepoint.go
type ListServiceGCSafepoint struct {
ServiceGCSafepoints []*ServiceSafePoint `json:"service_gc_safe_points"`
MinServiceGcSafepoint uint64 `json:"min_service_gc_safe_point,omitempty"`
GCSafePoint uint64 `json:"gc_safe_point"`
ServiceGCSafepoints []*ServiceSafePoint `json:"service_gc_safe_points"`
MinServiceGcSafepoint uint64 `json:"min_service_gc_safe_point,omitempty"`
GCSafePoint uint64 `json:"gc_safe_point"`
}

// ClusterState saves some cluster state information.
Expand Down
2 changes: 1 addition & 1 deletion tools/pd-ctl/pdctl/command/gc_safepoint_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
package command

import (
"sort"
"github.com/spf13/cobra"
"sort"
)

// NewServiceGCSafepointCommand return a service gc safepoint subcommand of rootCmd
Expand Down

0 comments on commit 002862c

Please sign in to comment.