Skip to content

Commit

Permalink
Merge branch 'master' into chore/adjust-release-mode
Browse files Browse the repository at this point in the history
  • Loading branch information
ti-chi-bot[bot] authored Dec 29, 2023
2 parents 0acbdd2 + 17f4b02 commit 50e959b
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions pkg/utils/topology/ticdc.go
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,12 @@ func FetchTiCDCTopology(ctx context.Context, etcdClient *clientv3.Client) ([]TiC

func parseTiCDCInfo(clusterName string, value []byte) (*TiCDCInfo, error) {
ds := struct {
ID string `json:"id"`
Address string `json:"address"`
Version string `json:"version"`
ID string `json:"id"`
Address string `json:"address"`
Version string `json:"version"`
GitHash string `json:"git-hash"`
DeployPath string `json:"deploy-path"`
StartTimestamp int64 `json:"start-timestamp"`
}{}

err := json.Unmarshal(value, &ds)
Expand All @@ -85,11 +88,14 @@ func parseTiCDCInfo(clusterName string, value []byte) (*TiCDCInfo, error) {
}

return &TiCDCInfo{
ClusterName: clusterName,
Version: ds.Version,
IP: hostname,
Port: port,
Status: ComponentStatusUp,
StatusPort: port,
ClusterName: clusterName,
GitHash: ds.GitHash,
Version: ds.Version,
IP: hostname,
Port: port,
DeployPath: ds.DeployPath,
Status: ComponentStatusUp,
StatusPort: port,
StartTimestamp: ds.StartTimestamp,
}, nil
}

0 comments on commit 50e959b

Please sign in to comment.