File tree Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Expand file tree Collapse file tree 2 files changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -755,6 +755,14 @@ func newAdminClusterCommands() []cli.Command {
755755 AdminDescribeCluster (c )
756756 },
757757 },
758+ {
759+ Name : "metadata" ,
760+ Aliases : []string {"m" },
761+ Usage : "Show cluster metadata" ,
762+ Action : func (c * cli.Context ) {
763+ AdminClusterMetadata (c )
764+ },
765+ },
758766 }
759767}
760768
Original file line number Diff line number Diff line change @@ -30,6 +30,7 @@ import (
3030 "github.com/fatih/color"
3131 "github.com/urfave/cli"
3232 enumspb "go.temporal.io/api/enums/v1"
33+ "go.temporal.io/api/workflowservice/v1"
3334
3435 "go.temporal.io/server/api/adminservice/v1"
3536)
@@ -82,3 +83,16 @@ func AdminDescribeCluster(c *cli.Context) {
8283
8384 prettyPrintJSONObject (response )
8485}
86+
87+ // AdminDescribeCluster is used to dump information about the cluster
88+ func AdminClusterMetadata (c * cli.Context ) {
89+ frontendClient := cFactory .FrontendClient (c )
90+ ctx , cancel := newContext (c )
91+ defer cancel ()
92+
93+ info , err := frontendClient .GetClusterInfo (ctx , & workflowservice.GetClusterInfoRequest {})
94+ if err != nil {
95+ ErrorAndExit ("Operation AdminClusterMetadata failed." , err )
96+ }
97+ prettyPrintJSONObject (info )
98+ }
You can’t perform that action at this time.
0 commit comments