Documentation ¶
Index ¶
- Constants
- func AdminDescribeHistoryHost(c *cli.Context)
- func AdminDescribeWorkflow(c *cli.Context)
- func CancelWorkflow(c *cli.Context)
- func ColorEvent(e *s.HistoryEvent) string
- func DescribeDomain(c *cli.Context)
- func DescribeTaskList(c *cli.Context)
- func DescribeWorkflow(c *cli.Context)
- func DescribeWorkflowWithID(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, printFully bool, maxFieldLength int) string
- func ListAllWorkflow(c *cli.Context)
- func ListWorkflow(c *cli.Context)
- func NewCliApp() *cli.App
- func ObserveHistory(c *cli.Context)
- func ObserveHistoryWithID(c *cli.Context)
- 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 SetRequiredDomainDataKeys(keys []string)
- 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" FlagHistoryAddress = "history_address" FlagHistoryAddressWithAlias = FlagHistoryAddress + ", had" FlagDomain = "domain" FlagDomainWithAlias = FlagDomain + ", do" FlagShardID = "shard_id" FlagShardIDWithAlias = FlagShardID + ", sid" 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" FlagMore = "more" FlagMoreWithAlias = FlagMore + ", m" FlagPageSize = "pagesize" FlagPageSizeWithAlias = FlagPageSize + ", ps" FlagEarliestTime = "earliest_time" FlagEarliestTimeWithAlias = FlagEarliestTime + ", et" FlagLatestTime = "latest_time" FlagLatestTimeWithAlias = FlagLatestTime + ", lt" FlagPrintEventVersion = "print_event_version" FlagPrintEventVersionWithAlias = FlagPrintEventVersion + ", pev" FlagPrintFullyDetail = "print_full" FlagPrintFullyDetailWithAlias = FlagPrintFullyDetail + ", pf" FlagPrintRawTime = "print_raw_time" FlagPrintRawTimeWithAlias = FlagPrintRawTime + ", prt" FlagPrintDateTime = "print_datetime" FlagPrintDateTimeWithAlias = FlagPrintDateTime + ", pdt" FlagDescription = "description" FlagDescriptionWithAlias = FlagDescription + ", desc" FlagOwnerEmail = "owner_email" FlagOwnerEmailWithAlias = FlagOwnerEmail + ", oe" FlagRetentionDays = "retention" 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" FlagShowDetail = "show_detail" FlagShowDetailWithAlias = FlagShowDetail + ", sd" FlagActiveClusterName = "active_cluster" FlagActiveClusterNameWithAlias = FlagActiveClusterName + ", ac" FlagClusters = "clusters" FlagClustersWithAlias = FlagClusters + ", cl" FlagDomainData = "domain_data" FlagDomainDataWithAlias = FlagDomainData + ", dmd" FlagEventID = "event_id" FlagEventIDWithAlias = FlagEventID + ", eid" FlagMaxFieldLength = "max_field_length" FlagMaxFieldLengthWithAlias = FlagMaxFieldLength + ", maxl" FlagSecurityToken = "security_token" FlagSecurityTokenWithAlias = FlagSecurityToken + ", st" )
* 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.5" )
Variables ¶
This section is empty.
Functions ¶
func AdminDescribeHistoryHost ¶ added in v0.3.13
AdminDescribeHistoryHost describes history host
func AdminDescribeWorkflow ¶ added in v0.3.13
AdminDescribeWorkflow describe a new workflow execution for admin
func CancelWorkflow ¶
CancelWorkflow cancels a workflow execution
func ColorEvent ¶ added in v0.3.11
func ColorEvent(e *s.HistoryEvent) string
ColorEvent takes an event and return string with color Event with color mapping rules:
Failed - red Timeout - yellow Canceled - magenta Completed - green Started - blue Others - default (white/black)
func DescribeTaskList ¶
DescribeTaskList show pollers info of a given tasklist
func DescribeWorkflow ¶ added in v0.3.11
DescribeWorkflow show information about the specified workflow execution
func DescribeWorkflowWithID ¶ added in v0.3.11
DescribeWorkflowWithID show information about the specified workflow execution
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, printFully bool, maxFieldLength int) string
HistoryEventToString convert HistoryEvent to string
func ListAllWorkflow ¶ added in v0.3.11
ListAllWorkflow list all workflow executions based on filters
func ListWorkflow ¶
ListWorkflow list workflow executions based on filters
func ObserveHistory ¶ added in v0.3.11
ObserveHistory show the process of running workflow
func ObserveHistoryWithID ¶ added in v0.3.11
ObserveHistoryWithID show the process of running workflow
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 SetRequiredDomainDataKeys ¶ added in v0.3.14
func SetRequiredDomainDataKeys(keys []string)
SetRequiredDomainDataKeys will set requiredDomainDataKeys
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) BuildAdminServiceClient ¶ added in v0.3.12
func (b *WorkflowClientBuilder) BuildAdminServiceClient(c *cli.Context) (adminserviceclient.Interface, error)
BuildAdminServiceClient builds a rpc service client to cadence admin service
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) BuildAdminServiceClient(c *cli.Context) (adminserviceclient.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.