This is an automated email from the ASF dual-hosted git repository.

xikai pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-horaedb.git


The following commit(s) were added to refs/heads/main by this push:
     new d7c5fd5b chore(horaemeta&horaectl): refactor clusters/diagnose 
response body (#1475)
d7c5fd5b is described below

commit d7c5fd5bc2a9af720d98362a72677486f9869070
Author: chunshao.rcs <[email protected]>
AuthorDate: Thu Feb 1 14:55:06 2024 +0800

    chore(horaemeta&horaectl): refactor clusters/diagnose response body (#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
---
 ctl/operation/clusters.go              | 6 +++---
 horaemeta/server/service/http/types.go | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/ctl/operation/clusters.go b/ctl/operation/clusters.go
index ad5a1df0..41c9d59e 100644
--- a/ctl/operation/clusters.go
+++ b/ctl/operation/clusters.go
@@ -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 {
diff --git a/horaemeta/server/service/http/types.go 
b/horaemeta/server/service/http/types.go
index 2d17652d..183257eb 100644
--- a/horaemeta/server/service/http/types.go
+++ b/horaemeta/server/service/http/types.go
@@ -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 {


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to