Skip to content

Commit

Permalink
added workflow query-types command (cadence-workflow#5456)
Browse files Browse the repository at this point in the history
  • Loading branch information
arzonus authored Dec 18, 2023
1 parent 14b5ef9 commit 7865f69
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
8 changes: 8 additions & 0 deletions tools/cli/workflow.go
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,14 @@ func newWorkflowCommands() []cli.Command {
QueryWorkflow(c)
},
},
{
Name: "query-types",
Usage: "list all available query types",
Flags: getFlagsForStack(),
Action: func(c *cli.Context) {
QueryWorkflowUsingQueryTypes(c)
},
},
{
Name: "stack",
Usage: "query workflow execution with __stack_trace as query type",
Expand Down
5 changes: 5 additions & 0 deletions tools/cli/workflowCommands.go
Original file line number Diff line number Diff line change
Expand Up @@ -629,6 +629,11 @@ func QueryWorkflowUsingStackTrace(c *cli.Context) {
queryWorkflowHelper(c, "__stack_trace")
}

// QueryWorkflowUsingQueryTypes list all query types of the workflow using __query_types as query type
func QueryWorkflowUsingQueryTypes(c *cli.Context) {
queryWorkflowHelper(c, "__query_types")
}

func queryWorkflowHelper(c *cli.Context, queryType string) {
serviceClient := cFactory.ServerFrontendClient(c)

Expand Down

0 comments on commit 7865f69

Please sign in to comment.