Documentation
¶
Index ¶
- Constants
- func CancelWorkflow(c *cli.Context)
- func DescribeDomain(c *cli.Context)
- func DescribeTaskList(c *cli.Context)
- func ErrorAndExit(msg string, err error)
- func ExitIfError(err error)
- func GetHistory(ctx context.Context, workflowClient client.Client, workflowID, runID string) (*s.History, error)
- func HistoryEventToString(e *s.HistoryEvent) string
- func ListWorkflow(c *cli.Context)
- func NewCliApp() *cli.App
- func QueryWorkflow(c *cli.Context)
- func QueryWorkflowUsingStackTrace(c *cli.Context)
- func RegisterDomain(c *cli.Context)
- func RunWorkflow(c *cli.Context)
- func SetBuilder(builder WorkflowClientBuilderInterface)
- func ShowHistory(c *cli.Context)
- func ShowHistoryWithWID(c *cli.Context)
- func SignalWorkflow(c *cli.Context)
- func StartWorkflow(c *cli.Context)
- func TerminateWorkflow(c *cli.Context)
- func UpdateDomain(c *cli.Context)
- type JSONHistorySerializer
- type WorkflowClientBuilder
- type WorkflowClientBuilderInterface
Constants ¶
const ( FlagAddress = "address" FlagAddressWithAlias = FlagAddress + ", ad" FlagDomain = "domain" FlagDomainWithAlias = FlagDomain + ", do" FlagWorkflowID = "workflow_id" FlagWorkflowIDWithAlias = FlagWorkflowID + ", wid, w" FlagRunID = "run_id" FlagRunIDWithAlias = FlagRunID + ", rid, r" FlagTaskList = "tasklist" FlagTaskListWithAlias = FlagTaskList + ", tl" FlagTaskListType = "tasklisttype" FlagTaskListTypeWithAlias = FlagTaskListType + ", tlt" FlagWorkflowType = "workflow_type" FlagWorkflowTypeWithAlias = FlagWorkflowType + ", wt" FlagExecutionTimeout = "execution_timeout" FlagExecutionTimeoutWithAlias = FlagExecutionTimeout + ", et" FlagDecisionTimeout = "decision_timeout" FlagDecisionTimeoutWithAlias = FlagDecisionTimeout + ", dt" FlagContextTimeout = "context_timeout" FlagContextTimeoutWithAlias = FlagContextTimeout + ", ct" FlagInput = "input" FlagInputWithAlias = FlagInput + ", i" FlagInputFile = "input_file" FlagInputFileWithAlias = FlagInputFile + ", if" FlagReason = "reason" FlagReasonWithAlias = FlagReason + ", re" FlagOpen = "open" FlagOpenWithAlias = FlagOpen + ", op" FlagPageSize = "pagesize" FlagPageSizeWithAlias = FlagPageSize + ", ps" FlagEarliestTime = "earliest_time" FlagEarliestTimeWithAlias = FlagEarliestTime + ", et" FlagLatestTime = "latest_time" FlagLatestTimeWithAlias = FlagLatestTime + ", lt" FlagPrintRawTime = "print_raw_time" FlagPrintRawTimeWithAlias = FlagPrintRawTime + ", prt" FlagDescription = "description" FlagDescriptionWithAlias = FlagDescription + ", desc" FlagOwnerEmail = "owner_email" FlagOwnerEmailWithAlias = FlagOwnerEmail + ", oe" FlagRetentionDays = "retention_days" FlagRetentionDaysWithAlias = FlagRetentionDays + ", rd" FlagEmitMetric = "emit_metric" FlagEmitMetricWithAlias = FlagEmitMetric + ", em" FlagName = "name" FlagNameWithAlias = FlagName + ", n" FlagOutputFilename = "output_filename" FlagOutputFilenameWithAlias = FlagOutputFilename + ", of" FlagQueryType = "query_type" FlagQueryTypeWithAlias = FlagQueryType + ", qt" )
* Flags used to specify cli command line arguments
const ( // Version is the controlled version string. It should be updated every time // before we release a new version. Version = "0.5.1" )
Variables ¶
This section is empty.
Functions ¶
func CancelWorkflow ¶
CancelWorkflow cancels a workflow execution
func DescribeTaskList ¶
DescribeTaskList show pollers info of a given tasklist
func ErrorAndExit ¶
ErrorAndExit print easy to understand error msg first then error detail in a new line
func ExitIfError ¶
func ExitIfError(err error)
ExitIfError exit while err is not nil and print the calling stack also
func GetHistory ¶
func GetHistory(ctx context.Context, workflowClient client.Client, workflowID, runID string) (*s.History, error)
GetHistory helper method to iterate over all pages and return complete list of history events
func HistoryEventToString ¶
func HistoryEventToString(e *s.HistoryEvent) string
HistoryEventToString convert HistoryEvent to string
func ListWorkflow ¶
ListWorkflow list workflow executions based on filters
func QueryWorkflowUsingStackTrace ¶
QueryWorkflowUsingStackTrace query workflow execution using __stack_trace as query type
func RunWorkflow ¶
RunWorkflow starts a new workflow execution and print workflow progress and result
func SetBuilder ¶
func SetBuilder(builder WorkflowClientBuilderInterface)
SetBuilder can be used to inject customized builder of cadence clients
func ShowHistory ¶
ShowHistory shows the history of given workflow execution based on workflowID and runID.
func ShowHistoryWithWID ¶
ShowHistoryWithWID shows the history of given workflow with workflow_id
func SignalWorkflow ¶
SignalWorkflow signals a workflow execution
func StartWorkflow ¶
StartWorkflow starts a new workflow execution
func TerminateWorkflow ¶
TerminateWorkflow terminates a workflow execution
Types ¶
type JSONHistorySerializer ¶
type JSONHistorySerializer struct{}
JSONHistorySerializer is used to encode history event in JSON
func (*JSONHistorySerializer) Deserialize ¶
func (j *JSONHistorySerializer) Deserialize(data []byte) (*s.History, error)
Deserialize deserializes history
type WorkflowClientBuilder ¶
type WorkflowClientBuilder struct {
// contains filtered or unexported fields
}
WorkflowClientBuilder build client to cadence service
func NewBuilder ¶
func NewBuilder() *WorkflowClientBuilder
NewBuilder creates a new WorkflowClientBuilder
func (*WorkflowClientBuilder) BuildServiceClient ¶
func (b *WorkflowClientBuilder) BuildServiceClient(c *cli.Context) (workflowserviceclient.Interface, error)
BuildServiceClient builds a rpc service client to cadence service
type WorkflowClientBuilderInterface ¶
type WorkflowClientBuilderInterface interface {
BuildServiceClient(c *cli.Context) (workflowserviceclient.Interface, error)
}
WorkflowClientBuilderInterface is an interface to build client to cadence service. User can customize builder by implementing this interface, and call SetBulder after initialize cli. (See cadence/cmd/tools/cli/main.go for example) The customized builder may have more processing on Env, Address and other info.