Skip to content

Commit

Permalink
chore(horaemeta&horaectl): refactor clusters/diagnose response body (a…
Browse files Browse the repository at this point in the history
…pache#1475)

## Rationale
The response body returned by the clusters/diagnose HTTP API uses an
underscore style, which is inconsistent with the original style.

## Detailed Changes
Change it back to the original camelCase naming convention.

## Test Plan
  • Loading branch information
chunshao90 authored Feb 1, 2024
1 parent 68ac30d commit d7c5fd5
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions ctl/operation/clusters.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ type ClusterResponse struct {
}

type DiagnoseShardStatus struct {
NodeName string `json:"node_name"`
NodeName string `json:"nodeName"`
Status string `json:"status"`
}

type DiagnoseShardResponse struct {
// shardID -> nodeName
UnregisteredShards []uint32 `json:"unregistered_shards"`
UnreadyShards map[uint32]DiagnoseShardStatus `json:"unready_shards"`
UnregisteredShards []uint32 `json:"unregisteredShards"`
UnreadyShards map[uint32]DiagnoseShardStatus `json:"unreadyShards"`
}

func clusterUrl() string {
Expand Down
6 changes: 3 additions & 3 deletions horaemeta/server/service/http/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,14 +80,14 @@ type API struct {
}

type DiagnoseShardStatus struct {
NodeName string `json:"node_name"`
NodeName string `json:"nodeName"`
Status string `json:"status"`
}

type DiagnoseShardResult struct {
// shardID -> nodeName
UnregisteredShards []storage.ShardID `json:"unregistered_shards"`
UnreadyShards map[storage.ShardID]DiagnoseShardStatus `json:"unready_shards"`
UnregisteredShards []storage.ShardID `json:"unregisteredShards"`
UnreadyShards map[storage.ShardID]DiagnoseShardStatus `json:"unreadyShards"`
}

type QueryTableRequest struct {
Expand Down

0 comments on commit d7c5fd5

Please sign in to comment.