-
Notifications
You must be signed in to change notification settings - Fork 330
cluster: add JSON output option for display #1358
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
8d19108 to
5e7f8ed
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There seems to be an empty file with no filename added in the PR, and need to be removed if it's not by intend.
And the tests are failing, you may use make check and make test to run static checks and unit tests at your local environment.
pkg/cluster/manager/display.go
Outdated
| 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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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: