cluster: add JSON output option for display#1358
Conversation
8d19108 to
5e7f8ed
Compare
| TLSCACert string `json:"tls_ca_cert"` | ||
| TLSClientCert string `json:"tls_client_cert"` | ||
| TLSClientKey string `json:"tls_client_key"` | ||
| URL string `json:"url"` |
There was a problem hiding this comment.
I think it's better be dashboard_url, as it's the URL of our builtin dashboard in PD, we may have other URLs or links to something else. (there is no such thing as a general "URL" for a TiDB cluster)
|
[REVIEW NOTIFICATION] This pull request has been approved by:
To complete the pull request process, please ask the reviewers in the list to review by filling The full list of commands accepted by this bot can be found here. DetailsReviewer can indicate their review by writing |
|
/merge |
|
This pull request has been accepted and is ready to merge. DetailsCommit hash: 42ee4cf |
What problem does this PR solve?
This adds JSON output for the
tiup cluster displaycommand. This makes it easier to parse the output and use it in other programs.#1355
What is changed and how it works?
This puts the info in a struct and uses encoding/json to format this as JSON
Check List
Tests
tiup cluster display myclustertiup cluster display --json myclusterSide effects
Related changes
Release notes: