cli

package
v1.2.14-prerelease14 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2024 License: MIT Imports: 104 Imported by: 3

README

Documentation for the Cadence command line interface is located at our main site.

Build CLI binary locally

To build the CLI tool locally check out the version tag (e.g. git checkout v0.21.3) and run make tools. This produces an executable called cadence.

Run help command with a local build:

./cadence --help

Command to describe a domain would look like this:

./cadence --domain samples-domain domain describe

Documentation

Overview

Package cli is a generated GoMock package.

Package cli is a generated GoMock package.

Package cli is a generated GoMock package.

Index

Constants

View Source
const (
	FlagVerbose                        = "verbose"
	FlagUsername                       = "username"
	FlagPassword                       = "password"
	FlagKeyspace                       = "keyspace"
	FlagDatabaseName                   = "db_name"
	FlagEncodingType                   = "encoding_type"
	FlagDecodingTypes                  = "decoding_types"
	FlagAddress                        = "address"
	FlagDestinationAddress             = "destination_address"
	FlagHistoryAddress                 = "history_address"
	FlagDBType                         = "db_type"
	FlagDBAddress                      = "db_address"
	FlagDBPort                         = "db_port"
	FlagDBRegion                       = "db_region"
	FlagDBShard                        = "db_shard"
	FlagProtoVersion                   = "protocol_version"
	FlagDomainID                       = "domain_id"
	FlagDomain                         = "domain"
	FlagDestinationDomain              = "destination_domain"
	FlagShardID                        = "shard_id"
	FlagShards                         = "shards"
	FlagRangeID                        = "range_id"
	FlagWorkflowID                     = "workflow_id"
	FlagRunID                          = "run_id"
	FlagTreeID                         = "tree_id"
	FlagBranchID                       = "branch_id"
	FlagNumberOfShards                 = "number_of_shards"
	FlagTargetCluster                  = "target_cluster"
	FlagSourceCluster                  = "source_cluster"
	FlagMinEventID                     = "min_event_id"
	FlagMaxEventID                     = "max_event_id"
	FlagEndEventVersion                = "end_event_version"
	FlagTaskList                       = "tasklist"
	FlagTaskListType                   = "tasklisttype"
	FlagWorkflowIDReusePolicy          = "workflowidreusepolicy"
	FlagCronSchedule                   = "cron"
	FlagWorkflowType                   = "workflow_type"
	FlagWorkflowStatus                 = "status"
	FlagExecutionTimeout               = "execution_timeout"
	FlagDecisionTimeout                = "decision_timeout"
	FlagContextTimeout                 = "context_timeout"
	FlagInput                          = "input"
	FlagInputFile                      = "input_file"
	FlagInputEncoding                  = "encoding"
	FlagSignalInput                    = "signal_input"
	FlagSignalInputFile                = "signal_input_file"
	FlagExcludeFile                    = "exclude_file"
	FlagInputSeparator                 = "input_separator"
	FlagParallelism                    = "input_parallelism"
	FlagParallismDeprecated            = "input_parallism" // typo, replaced by FlagParallelism
	FlagScanType                       = "scan_type"
	FlagInvariantCollection            = "invariant_collection"
	FlagSkipCurrentOpen                = "skip_current_open"
	FlagSkipCurrentCompleted           = "skip_current_completed"
	FlagSkipBaseIsNotCurrent           = "skip_base_is_not_current"
	FlagDryRun                         = "dry_run"
	FlagNonDeterministicOnly           = "only_non_deterministic"
	FlagInputTopic                     = "input_topic"
	FlagHostFile                       = "host_file"
	FlagCluster                        = "cluster"
	FlagInputCluster                   = "input_cluster"
	FlagStartOffset                    = "start_offset"
	FlagTopic                          = "topic"
	FlagGroup                          = "group"
	FlagResult                         = "result"
	FlagIdentity                       = "identity"
	FlagDetail                         = "detail"
	FlagReason                         = "reason"
	FlagOpen                           = "open"
	FlagMore                           = "more"
	FlagAll                            = "all"
	FlagPrefix                         = "prefix"
	FlagDeprecated                     = "deprecated"
	FlagForce                          = "force"
	FlagPageID                         = "page_id"
	FlagPageSize                       = "pagesize"
	FlagEarliestTime                   = "earliest_time"
	FlagLatestTime                     = "latest_time"
	FlagPrintEventVersion              = "print_event_version"
	FlagPrintFullyDetail               = "print_full"
	FlagPrintRawTime                   = "print_raw_time"
	FlagPrintRaw                       = "print_raw"
	FlagPrintDateTime                  = "print_datetime"
	FlagPrintMemo                      = "print_memo"
	FlagPrintSearchAttr                = "print_search_attr"
	FlagPrintJSON                      = "print_json" // Deprecated: use --format json
	FlagDescription                    = "description"
	FlagOwnerEmail                     = "owner_email"
	FlagRetentionDays                  = "retention"
	FlagHistoryArchivalStatus          = "history_archival_status"
	FlagHistoryArchivalURI             = "history_uri"
	FlagVisibilityArchivalStatus       = "visibility_archival_status"
	FlagVisibilityArchivalURI          = "visibility_uri"
	FlagName                           = "name"
	FlagOutputFilename                 = "output_filename"
	FlagOutputFormat                   = "output"
	FlagQueryType                      = "query_type"
	FlagQueryRejectCondition           = "query_reject_condition"
	FlagQueryConsistencyLevel          = "query_consistency_level"
	FlagShowDetail                     = "show_detail"
	FlagActiveClusterName              = "active_cluster"
	FlagClusters                       = "clusters"
	FlagIsGlobalDomain                 = "global_domain"
	FlagDomainData                     = "domain_data"
	FlagEventID                        = "event_id"
	FlagActivityID                     = "activity_id"
	FlagMaxFieldLength                 = "max_field_length"
	FlagSecurityToken                  = "security_token"
	FlagSkipErrorMode                  = "skip_errors"
	FlagRemote                         = "remote"
	FlagTimerType                      = "timer_type"
	FlagHeadersMode                    = "headers"
	FlagMessageType                    = "message_type"
	FlagURL                            = "url"
	FlagIndex                          = "index"
	FlagBatchSize                      = "batch_size"
	FlagMemoKey                        = "memo_key"
	FlagMemo                           = "memo"
	FlagMemoFile                       = "memo_file"
	FlagSearchAttributesKey            = "search_attr_key"
	FlagSearchAttributesVal            = "search_attr_value"
	FlagSearchAttributesType           = "search_attr_type"
	FlagAddBadBinary                   = "add_bad_binary"
	FlagRemoveBadBinary                = "remove_bad_binary"
	FlagResetType                      = "reset_type"
	FlagDecisionOffset                 = "decision_offset"
	FlagResetPointsOnly                = "reset_points_only"
	FlagResetBadBinaryChecksum         = "reset_bad_binary_checksum"
	FlagSkipSignalReapply              = "skip_signal_reapply"
	FlagListQuery                      = "query"
	FlagExcludeWorkflowIDByQuery       = "exclude_query"
	FlagBatchType                      = "batch_type"
	FlagSignalName                     = "signal_name"
	FlagTaskID                         = "task_id"
	FlagTaskType                       = "task_type"
	FlagTaskVisibilityTimestamp        = "task_timestamp"
	FlagQueueType                      = "queue_type"
	FlagStartingRPS                    = "starting_rps"
	FlagRPS                            = "rps"
	FlagRPSScaleUpSeconds              = "rps_scale_up_seconds"
	FlagJobID                          = "job_id"
	FlagYes                            = "yes"
	FlagServiceConfigDir               = "service_config_dir"
	FlagServiceEnv                     = "service_env"
	FlagServiceZone                    = "service_zone"
	FlagEnableTLS                      = "tls"
	FlagTLSCertPath                    = "tls_cert_path"
	FlagTLSKeyPath                     = "tls_key_path"
	FlagTLSCaPath                      = "tls_ca_path"
	FlagTLSEnableHostVerification      = "tls_enable_host_verification"
	FlagDLQType                        = "dlq_type"
	FlagMaxMessageCount                = "max_message_count"
	FlagLastMessageID                  = "last_message_id"
	FlagConcurrency                    = "concurrency"
	FlagReportRate                     = "report_rate"
	FlagLowerShardBound                = "lower_shard_bound"
	FlagUpperShardBound                = "upper_shard_bound"
	FlagInputDirectory                 = "input_directory"
	FlagSkipHistoryChecks              = "skip_history_checks"
	FlagFailoverType                   = "failover_type"
	FlagFailoverTimeout                = "failover_timeout_seconds"
	FlagActivityHeartBeatTimeout       = "heart_beat_timeout_seconds"
	FlagFailoverWaitTime               = "failover_wait_time_second"
	FlagFailoverBatchSize              = "failover_batch_size"
	FlagFailoverDomains                = "domains"
	FlagFailoverDrillWaitTime          = "failover_drill_wait_second"
	FlagFailoverDrill                  = "failover_drill"
	FlagRetryInterval                  = "retry_interval"
	FlagRetryAttempts                  = "retry_attempts"
	FlagRetryExpiration                = "retry_expiration"
	FlagRetryBackoff                   = "retry_backoff"
	FlagRetryMaxInterval               = "retry_max_interval"
	FlagHeaderKey                      = "header_key"
	FlagHeaderValue                    = "header_value"
	FlagHeaderFile                     = "header_file"
	FlagStartDate                      = "start_date"
	FlagEndDate                        = "end_date"
	FlagDateFormat                     = "date_format"
	FlagShardMultiplier                = "shard_multiplier"
	FlagBucketSize                     = "bucket_size"
	DelayStartSeconds                  = "delay_start_seconds"
	JitterStartSeconds                 = "jitter_start_seconds"
	FirstRunAtTime                     = "first_run_at_time"
	FlagConnectionAttributes           = "conn_attrs"
	FlagJWT                            = "jwt"
	FlagJWTPrivateKey                  = "jwt-private-key"
	FlagDynamicConfigName              = "name"
	FlagDynamicConfigFilter            = "filter"
	FlagDynamicConfigValue             = "value"
	FlagTransport                      = "transport"
	FlagFormat                         = "format"
	FlagJSON                           = "json"
	FlagIsolationGroupSetDrains        = "set-drains"
	FlagIsolationGroupsRemoveAllDrains = "remove-all-drains"
	FlagSearchAttribute                = "search_attr"
)

Flags used to specify cli command line arguments

View Source
const (
	// CtxKeyJWT is the name of the context key for the JWT
	CtxKeyJWT = ContextKey("ctxKeyJWT")
)

Variables

This section is empty.

Functions

func AdminAddSearchAttribute added in v0.6.0

func AdminAddSearchAttribute(c *cli.Context) error

AdminAddSearchAttribute to whitelist search attribute

func AdminCatIndices added in v0.5.3

func AdminCatIndices(c *cli.Context) error

AdminCatIndices cat indices for ES cluster

func AdminCloseShard added in v0.15.0

func AdminCloseShard(c *cli.Context) error

AdminCloseShard closes shard by shard id

func AdminCountDLQMessages added in v0.25.0

func AdminCountDLQMessages(c *cli.Context) error

AdminCountDLQMessages returns info how many and where DLQ messages are queued

func AdminDBClean added in v0.13.0

func AdminDBClean(c *cli.Context) error

AdminDBClean is the command to clean up unhealthy executions. Input is a JSON stream provided via STDIN or a file.

func AdminDBDataDecodeThrift added in v0.24.0

func AdminDBDataDecodeThrift(c *cli.Context) error

AdminDBDataDecodeThrift is the command to decode thrift binary into JSON

func AdminDBScan added in v0.13.0

func AdminDBScan(c *cli.Context) error

AdminDBScan is used to scan over executions in database and detect corruptions.

func AdminDBScanUnsupportedWorkflow added in v0.16.0

func AdminDBScanUnsupportedWorkflow(c *cli.Context) error

AdminDBScanUnsupportedWorkflow is to scan DB for unsupported workflow for a new release

func AdminDelete added in v0.9.0

func AdminDelete(c *cli.Context) error

AdminDelete used to delete documents from ElasticSearch with input of list result

func AdminDeleteWorkflow added in v0.5.0

func AdminDeleteWorkflow(c *cli.Context) error

AdminDeleteWorkflow delete a workflow execution for admin

func AdminDescribeCluster added in v0.11.0

func AdminDescribeCluster(c *cli.Context) error

AdminDescribeCluster is used to dump information about the cluster

func AdminDescribeHistoryHost added in v0.3.13

func AdminDescribeHistoryHost(c *cli.Context) error

AdminDescribeHistoryHost describes history host

func AdminDescribeQueue added in v0.15.0

func AdminDescribeQueue(c *cli.Context) error

AdminDescribeQueue describes task processing queue states

func AdminDescribeShard added in v0.14.0

func AdminDescribeShard(c *cli.Context) error

AdminDescribeShard describes shard by shard id

func AdminDescribeShardDistribution added in v0.22.0

func AdminDescribeShardDistribution(c *cli.Context) error

AdminDescribeShardDistribution describes shard distribution

func AdminDescribeTaskList added in v0.5.7

func AdminDescribeTaskList(c *cli.Context) error

AdminDescribeTaskList displays poller and status information of task list.

func AdminDescribeWorkflow added in v0.3.13

func AdminDescribeWorkflow(c *cli.Context) error

AdminDescribeWorkflow describe a new workflow execution for admin

func AdminFailoverAbort added in v0.15.0

func AdminFailoverAbort(c *cli.Context) error

AdminFailoverAbort abort a failover workflow

func AdminFailoverList added in v0.15.0

func AdminFailoverList(c *cli.Context) error

AdminFailoverList list failover runs

func AdminFailoverPause added in v0.15.0

func AdminFailoverPause(c *cli.Context) error

AdminFailoverPause pause failover workflow

func AdminFailoverQuery added in v0.15.0

func AdminFailoverQuery(c *cli.Context) error

AdminFailoverQuery query a failover workflow

func AdminFailoverResume added in v0.15.0

func AdminFailoverResume(c *cli.Context) error

AdminFailoverResume resume a paused failover workflow

func AdminFailoverRollback added in v0.15.0

func AdminFailoverRollback(c *cli.Context) error

AdminFailoverRollback rollback a failover run

func AdminFailoverStart added in v0.15.0

func AdminFailoverStart(c *cli.Context) error

AdminFailoverStart start failover workflow

func AdminGetAsyncWFConfig added in v1.2.8

func AdminGetAsyncWFConfig(c *cli.Context) error

func AdminGetDLQMessages added in v0.12.0

func AdminGetDLQMessages(c *cli.Context) error

AdminGetDLQMessages gets DLQ metadata

func AdminGetDomainIDOrName added in v0.5.0

func AdminGetDomainIDOrName(c *cli.Context) error

AdminGetDomainIDOrName map domain

func AdminGetDomainIsolationGroups added in v1.2.1

func AdminGetDomainIsolationGroups(c *cli.Context) error

func AdminGetDynamicConfig added in v0.23.1

func AdminGetDynamicConfig(c *cli.Context) error

AdminGetDynamicConfig gets value of specified dynamic config parameter matching specified filter

func AdminGetGlobalIsolationGroups added in v1.2.1

func AdminGetGlobalIsolationGroups(c *cli.Context) error

func AdminGetShardID added in v0.5.0

func AdminGetShardID(c *cli.Context) error

AdminGetShardID get shardID

func AdminIndex added in v0.5.3

func AdminIndex(c *cli.Context) error

AdminIndex used to bulk insert message from kafka parse

func AdminKafkaParse added in v0.5.0

func AdminKafkaParse(c *cli.Context) error

AdminKafkaParse parses the output of k8read and outputs replication tasks

func AdminListConfigKeys added in v1.0.0

func AdminListConfigKeys(c *cli.Context) error

AdminListConfigKeys lists all available dynamic config keys with description and default value

func AdminListDynamicConfig added in v0.23.1

func AdminListDynamicConfig(c *cli.Context) error

AdminListDynamicConfig lists all values associated with specified dynamic config parameter or all values for all dc parameter if none is specified.

func AdminListTaskList added in v0.24.0

func AdminListTaskList(c *cli.Context) error

AdminListTaskList displays all task lists under a domain.

func AdminMaintainCorruptWorkflow added in v0.24.0

func AdminMaintainCorruptWorkflow(c *cli.Context) error

AdminMaintainCorruptWorkflow deletes workflow from DB if it's corrupt

func AdminMergeDLQMessages added in v0.12.0

func AdminMergeDLQMessages(c *cli.Context) error

AdminMergeDLQMessages merges message from DLQ

func AdminPurgeDLQMessages added in v0.12.0

func AdminPurgeDLQMessages(c *cli.Context) error

AdminPurgeDLQMessages deletes messages from DLQ

func AdminRebalanceList added in v0.22.0

func AdminRebalanceList(c *cli.Context) error

func AdminRebalanceStart added in v0.22.0

func AdminRebalanceStart(c *cli.Context) error

func AdminRefreshWorkflowTasks added in v0.12.0

func AdminRefreshWorkflowTasks(c *cli.Context) error

AdminRefreshWorkflowTasks refreshes all the tasks of a workflow

func AdminRemoveTask added in v0.9.0

func AdminRemoveTask(c *cli.Context) error

AdminRemoveTask describes history host

func AdminRereplicate added in v0.5.0

func AdminRereplicate(c *cli.Context) error

AdminRereplicate parses will re-publish replication tasks to topic

func AdminResetQueue added in v0.15.0

func AdminResetQueue(c *cli.Context) error

AdminResetQueue resets task processing queue states

func AdminRestoreDynamicConfig added in v0.23.1

func AdminRestoreDynamicConfig(c *cli.Context) error

AdminRestoreDynamicConfig removes values of specified dynamic config parameter matching specified filter

func AdminSetShardRangeID added in v0.16.0

func AdminSetShardRangeID(c *cli.Context) error

AdminSetShardRangeID set shard rangeID by shard id

func AdminShowWorkflow added in v0.5.0

func AdminShowWorkflow(c *cli.Context) error

AdminShowWorkflow shows history

func AdminTimers added in v0.14.0

func AdminTimers(c *cli.Context) error

AdminTimers is used to list scheduled timers.

func AdminUpdateAsyncWFConfig added in v1.2.8

func AdminUpdateAsyncWFConfig(c *cli.Context) error

func AdminUpdateDomainIsolationGroups added in v1.2.1

func AdminUpdateDomainIsolationGroups(c *cli.Context) error

func AdminUpdateDynamicConfig added in v0.23.1

func AdminUpdateDynamicConfig(c *cli.Context) error

AdminUpdateDynamicConfig updates specified dynamic config parameter with specified values

func AdminUpdateGlobalIsolationGroups added in v1.2.1

func AdminUpdateGlobalIsolationGroups(c *cli.Context) error

func CancelWorkflow

func CancelWorkflow(c *cli.Context) error

CancelWorkflow cancels a workflow execution

func ColorEvent added in v0.3.11

func ColorEvent(e *types.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 CompleteActivity added in v0.5.7

func CompleteActivity(c *cli.Context) error

CompleteActivity completes an activity

func CountWorkflow added in v0.6.0

func CountWorkflow(c *cli.Context) error

CountWorkflow count number of workflows

func DescribeBatchJob added in v0.7.0

func DescribeBatchJob(c *cli.Context) error

DescribeBatchJob describe the status of the batch job

func DescribeTaskList

func DescribeTaskList(c *cli.Context) error

DescribeTaskList show pollers info of a given tasklist

func DescribeWorkflow added in v0.3.11

func DescribeWorkflow(c *cli.Context) error

DescribeWorkflow show information about the specified workflow execution

func DescribeWorkflowWithID added in v0.3.11

func DescribeWorkflowWithID(c *cli.Context) error

DescribeWorkflowWithID show information about the specified workflow execution

func DiagnoseWorkflow added in v1.2.14

func DiagnoseWorkflow(c *cli.Context) error

DiagnoseWorkflow diagnoses a workflow execution

func EventColorFunction added in v1.2.1

func EventColorFunction(eventType types.EventType) func(format string, a ...interface{}) string

func FailActivity added in v0.5.7

func FailActivity(c *cli.Context) error

FailActivity fails an activity

func GenerateReport added in v0.8.0

func GenerateReport(c *cli.Context) error

GenerateReport generate report for an aggregation query to ES

func GetHistory

func GetHistory(ctx context.Context, workflowClient frontend.Client, domain, workflowID, runID string) (*types.History, error)

GetHistory helper method to iterate over all pages and return complete list of history events

func GetSearchAttributes added in v0.5.9

func GetSearchAttributes(c *cli.Context) error

GetSearchAttributes get valid search attributes

func GetWorkflowHistoryIterator added in v0.24.0

func GetWorkflowHistoryIterator(
	ctx context.Context,
	workflowClient frontend.Client,
	domain,
	workflowID,
	runID string,
	isLongPoll bool,
	filterType *types.HistoryEventFilterType,
) (pagination.Iterator, error)

GetWorkflowHistoryIterator returns a HistoryEvent iterator

func HistoryEventToString

func HistoryEventToString(e *types.HistoryEvent, printFully bool, maxFieldLength int) string

HistoryEventToString convert HistoryEvent to string

func ListAllWorkflow added in v0.3.11

func ListAllWorkflow(c *cli.Context) error

ListAllWorkflow list all workflow executions based on filters

func ListArchivedWorkflow added in v0.9.3

func ListArchivedWorkflow(c *cli.Context) error

ListArchivedWorkflow lists archived workflow executions based on filters

func ListBatchJobs added in v0.7.0

func ListBatchJobs(c *cli.Context) error

ListBatchJobs list the started batch jobs

func ListTaskListPartitions added in v0.12.0

func ListTaskListPartitions(c *cli.Context) error

ListTaskListPartitions gets all the tasklist partition and host information.

func ListWorkflow

func ListWorkflow(c *cli.Context) error

ListWorkflow list workflow executions based on filters

func NewCliApp

func NewCliApp(cf ClientFactory, opts ...CLIAppOptions) *cli.App

NewCliApp instantiates a new instance of the CLI application

func ObserveHistory added in v0.3.11

func ObserveHistory(c *cli.Context) error

ObserveHistory show the process of running workflow

func ObserveHistoryWithID added in v0.3.11

func ObserveHistoryWithID(c *cli.Context) error

ObserveHistoryWithID show the process of running workflow

func QueryWorkflow

func QueryWorkflow(c *cli.Context) error

QueryWorkflow query workflow execution

func QueryWorkflowUsingQueryTypes added in v1.2.7

func QueryWorkflowUsingQueryTypes(c *cli.Context) error

QueryWorkflowUsingQueryTypes list all query types of the workflow using __query_types as query type

func QueryWorkflowUsingStackTrace

func QueryWorkflowUsingStackTrace(c *cli.Context) error

QueryWorkflowUsingStackTrace query workflow execution using __stack_trace as query type

func Render added in v0.24.0

func Render(c *cli.Context, data interface{}, opts RenderOptions) (err error)

Render is an entry point for presentation layer. It uses --format flag to determine output format.

func RenderTable added in v0.24.0

func RenderTable(w io.Writer, data interface{}, opts RenderOptions) error

RenderTable is generic function for rendering a slice of structs as a table

func RenderTemplate added in v0.24.0

func RenderTemplate(w io.Writer, data interface{}, tmpl string, opts RenderOptions) error

RenderTemplate uses golang text/template format to render data with user provided template

func ResetInBatch added in v0.5.8

func ResetInBatch(c *cli.Context) error

ResetInBatch resets workflow in batch

func ResetWorkflow added in v0.5.2

func ResetWorkflow(c *cli.Context) error

ResetWorkflow reset workflow

func RestartWorkflow added in v0.25.0

func RestartWorkflow(c *cli.Context) error

RestartWorkflow restarts a workflow execution

func RunWorkflow

func RunWorkflow(c *cli.Context) error

RunWorkflow starts a new workflow execution and print workflow progress and result

func ScanAllWorkflow added in v0.9.0

func ScanAllWorkflow(c *cli.Context) error

ScanAllWorkflow list all workflow executions using Scan API. It should be faster than ListAllWorkflow, but result are not sorted.

func SetRequiredDomainDataKeys added in v0.3.14

func SetRequiredDomainDataKeys(keys []string)

SetRequiredDomainDataKeys will set requiredDomainDataKeys

func ShowHistory

func ShowHistory(c *cli.Context) error

ShowHistory shows the history of given workflow execution based on workflowID and runID.

func ShowHistoryWithWID

func ShowHistoryWithWID(c *cli.Context) error

ShowHistoryWithWID shows the history of given workflow with workflow_id

func SignalWithStartWorkflowExecution added in v0.18.0

func SignalWithStartWorkflowExecution(c *cli.Context) error

SignalWithStartWorkflowExecution starts a workflow execution if not already exists and signals it

func SignalWorkflow

func SignalWorkflow(c *cli.Context) error

SignalWorkflow signals a workflow execution

func StartBatchJob added in v0.7.0

func StartBatchJob(c *cli.Context) error

StartBatchJob starts a batch job

func StartWorkflow

func StartWorkflow(c *cli.Context) error

StartWorkflow starts a new workflow execution

func TerminateBatchJob added in v0.7.0

func TerminateBatchJob(c *cli.Context) error

TerminateBatchJob stops abatch job

func TerminateWorkflow

func TerminateWorkflow(c *cli.Context) error

TerminateWorkflow terminates a workflow execution

Types

type AutoResetPointRow added in v0.24.0

type AutoResetPointRow struct {
	BinaryChecksum string    `header:"Binary Checksum"`
	CreateTime     time.Time `header:"Create Time"`
	RunID          string    `header:"RunID"`
	EventID        int64     `header:"EventID"`
}

type BadBinaryRow added in v0.24.0

type BadBinaryRow struct {
	Checksum  string    `header:"Binary Checksum"`
	Operator  string    `header:"Operator"`
	StartTime time.Time `header:"Start Time"`
	Reason    string    `header:"Reason"`
}

type CLIAppOptions

type CLIAppOptions func(*cli.App)

func WithIOHandler

func WithIOHandler(h IOHandler) CLIAppOptions

WithIOHandler sets the IOHandler for the CLI app. By default the app uses urfave's default Reader/Writer/ErrorWriter.

func WithManagerFactory

func WithManagerFactory(factory ManagerFactory) CLIAppOptions

WithManagerFactory sets the ManagerFactory for the CLI app.

type ClientFactory added in v0.5.0

type ClientFactory interface {
	ServerFrontendClient(c *cli.Context) (frontend.Client, error)
	ServerAdminClient(c *cli.Context) (admin.Client, error)

	// ServerFrontendClientForMigration frontend client of the migration destination
	ServerFrontendClientForMigration(c *cli.Context) (frontend.Client, error)
	// ServerAdminClientForMigration admin client of the migration destination
	ServerAdminClientForMigration(c *cli.Context) (admin.Client, error)

	ElasticSearchClient(c *cli.Context) (*elastic.Client, error)

	ServerConfig(c *cli.Context) (*config.Config, error)
}

ClientFactory is used to construct rpc clients

func NewClientFactory added in v0.5.0

func NewClientFactory(logger *zap.Logger) ClientFactory

NewClientFactory creates a new ClientFactory

type ClustersConfig added in v0.5.0

type ClustersConfig struct {
	Clusters map[string]config.ClusterConfig
	TLS      config.TLS
}

ClustersConfig describes the kafka clusters

type ContextKey added in v0.23.1

type ContextKey string

ContextKey is an alias for string, used as context key

type DLQRow added in v0.24.0

type DLQRow struct {
	ShardID         int                        `header:"Shard ID" json:"shardID"`
	DomainName      string                     `header:"Domain Name" json:"domainName"`
	DomainID        string                     `header:"Domain ID" json:"domainID"`
	WorkflowID      string                     `header:"Workflow ID" json:"workflowID"`
	RunID           string                     `header:"Run ID" json:"runID"`
	TaskID          int64                      `header:"Task ID" json:"taskID"`
	TaskType        *types.ReplicationTaskType `header:"Task Type" json:"taskType"`
	Version         int64                      `json:"version"`
	FirstEventID    int64                      `json:"firstEventID"`
	NextEventID     int64                      `json:"nextEventID"`
	ScheduledID     int64                      `json:"scheduledID"`
	ReplicationTask *types.ReplicationTask     `json:"replicationTask"`

	// Those are deserialized variants from history replications task
	Events       []*types.HistoryEvent `json:"events"`
	NewRunEvents []*types.HistoryEvent `json:"newRunEvents,omitempty"`

	// Only event IDs for compact table representation
	EventIDs       []int64 `header:"Event IDs"`
	NewRunEventIDs []int64 `header:"New Run Event IDs"`
}

type DomainMigrationCommand added in v1.2.5

type DomainMigrationCommand interface {
	Validation(c *cli.Context) error
	DomainMetaDataCheck(c *cli.Context) (DomainMigrationRow, error)
	DomainWorkFlowCheck(c *cli.Context) (DomainMigrationRow, error)
	SearchAttributesChecker(c *cli.Context) (DomainMigrationRow, error)
	DynamicConfigCheck(c *cli.Context) (DomainMigrationRow, error)
}

func NewDomainMigrationCommand added in v1.2.5

func NewDomainMigrationCommand(c *cli.Context) DomainMigrationCommand

Export a function to create an instance of the domainMigrationCLIImpl.

type DomainMigrationRow added in v1.2.1

type DomainMigrationRow struct {
	ValidationCheck   string `header:"Validation Checker"`
	ValidationResult  bool   `header:"Validation Result"`
	ValidationDetails ValidationDetails
}

type DomainRow added in v0.24.0

type DomainRow struct {
	Name                     string `header:"Name"`
	UUID                     string `header:"UUID"`
	Description              string
	OwnerEmail               string
	DomainData               map[string]string  `header:"Domain Data"`
	Status                   types.DomainStatus `header:"Status"`
	IsGlobal                 bool               `header:"Is Global Domain"`
	ActiveCluster            string             `header:"Active Cluster"`
	Clusters                 []string           `header:"Clusters"`
	RetentionDays            int32              `header:"Retention Days"`
	EmitMetrics              bool
	HistoryArchivalStatus    types.ArchivalStatus `header:"History Archival Status"`
	HistoryArchivalURI       string               `header:"History Archival URI"`
	VisibilityArchivalStatus types.ArchivalStatus `header:"Visibility Archival Status"`
	VisibilityArchivalURI    string               `header:"Visibility Archival URI"`
	BadBinaries              []BadBinaryRow
	FailoverInfo             *FailoverInfoRow
	LongRunningWorkFlowNum   *int
}

type ESIndexRow added in v0.24.0

type ESIndexRow struct {
	Health             string `header:"Health"`
	Status             string `header:"Status"`
	Index              string `header:"Index"`
	PrimaryShards      int    `header:"Pri"`
	ReplicaShards      int    `header:"Rep"`
	DocsCount          int    `header:"Docs Count"`
	DocsDeleted        int    `header:"Docs Deleted"`
	StorageSize        string `header:"Store Size"`
	PrimaryStorageSize string `header:"Pri Store Size"`
}

type FailoverInfoRow added in v0.24.0

type FailoverInfoRow struct {
	FailoverVersion     int64     `header:"Failover Version"`
	StartTime           time.Time `header:"Start Time"`
	ExpireTime          time.Time `header:"Expire Time"`
	CompletedShardCount int32     `header:"Completed Shard Count"`
	PendingShard        []int32   `header:"Pending Shard"`
}

type Histogram added in v0.14.0

type Histogram struct {
	// contains filtered or unexported fields
}

Histogram holds the occurrence count for each key

func NewHistogram added in v0.14.0

func NewHistogram() *Histogram

NewHistogram creates a new Histogram

func (*Histogram) Add added in v0.14.0

func (h *Histogram) Add(key string)

Add will increment occurrence count of the key

func (*Histogram) Len added in v0.14.0

func (h *Histogram) Len() int

func (*Histogram) Less added in v0.14.0

func (h *Histogram) Less(i, j int) bool

func (*Histogram) Print added in v0.14.0

func (h *Histogram) Print(output io.Writer, multiplier int) error

Print will output histogram with key and counter information.

func (*Histogram) Swap added in v0.14.0

func (h *Histogram) Swap(i, j int)

type HistoryDLQCountRow added in v0.25.0

type HistoryDLQCountRow struct {
	SourceCluster string `header:"Source Cluster" json:"sourceCluster"`
	ShardID       int32  `header:"Shard ID" json:"shardID"`
	Count         int64  `header:"Count" json:"count"`
}

type IOHandler

type IOHandler interface {

	// Input is the "primary" input to read from.
	//
	// This is currently always os.Stdin, as files are handled separately.
	Input() io.Reader
	// Output should be used to write to the primary output target.
	// This may be os.Stdout or a file (or an in-memory writer),
	// and it should only be used for the "results" of a command so values
	// can be redirected / grepped / etc reasonably.
	//
	// For progress or info-like output, use Progress() instead.
	//
	// For errors, return an error value instead.
	Output() io.Writer
	// Progress should be used for any "non-result" output,
	// e.g. "loading X" or "press enter to continue" or similar.
	//
	// This generally writes to os.Stderr so any displayed text will
	// be visible when the CLI is piped, and will not be sent into "result" files.
	//
	// For error reporting, return an error instead, such as a commoncli.Problem
	Progress() io.Writer
}

type JSONHistorySerializer

type JSONHistorySerializer struct{}

JSONHistorySerializer is used to encode history event in JSON

func (*JSONHistorySerializer) Deserialize

func (j *JSONHistorySerializer) Deserialize(data []byte) (*types.History, error)

Deserialize deserializes history

func (*JSONHistorySerializer) Serialize

func (j *JSONHistorySerializer) Serialize(h *types.History) ([]byte, error)

Serialize serializes history.

type LoadCloser added in v0.22.0

type LoadCloser interface {
	Load() ([]*persistence.TimerTaskInfo, error)
	Close()
}

LoadCloser loads timer task information

func NewDBLoadCloser added in v0.22.0

func NewDBLoadCloser(c *cli.Context) (LoadCloser, error)

NewDBLoadCloser creates a new LoadCloser to load timer task information from database

func NewFileLoadCloser added in v0.22.0

func NewFileLoadCloser(c *cli.Context) (LoadCloser, error)

type ManagerFactory

type ManagerFactory interface {
	// contains filtered or unexported methods
}

type MismatchedDynamicConfig added in v1.2.1

type MismatchedDynamicConfig struct {
	Key        dynamicconfig.Key
	CurrValues []*types.DynamicConfigValue
	NewValues  []*types.DynamicConfigValue
}

type MockClientFactory

type MockClientFactory struct {
	// contains filtered or unexported fields
}

MockClientFactory is a mock of ClientFactory interface.

func NewMockClientFactory

func NewMockClientFactory(ctrl *gomock.Controller) *MockClientFactory

NewMockClientFactory creates a new mock instance.

func (*MockClientFactory) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockClientFactory) ElasticSearchClient

func (m *MockClientFactory) ElasticSearchClient(c *cli.Context) (*elastic.Client, error)

ElasticSearchClient mocks base method.

func (*MockClientFactory) ServerAdminClient

func (m *MockClientFactory) ServerAdminClient(c *cli.Context) (admin.Client, error)

ServerAdminClient mocks base method.

func (*MockClientFactory) ServerAdminClientForMigration

func (m *MockClientFactory) ServerAdminClientForMigration(c *cli.Context) (admin.Client, error)

ServerAdminClientForMigration mocks base method.

func (*MockClientFactory) ServerConfig

func (m *MockClientFactory) ServerConfig(c *cli.Context) (*config.Config, error)

ServerConfig mocks base method.

func (*MockClientFactory) ServerFrontendClient

func (m *MockClientFactory) ServerFrontendClient(c *cli.Context) (frontend.Client, error)

ServerFrontendClient mocks base method.

func (*MockClientFactory) ServerFrontendClientForMigration

func (m *MockClientFactory) ServerFrontendClientForMigration(c *cli.Context) (frontend.Client, error)

ServerFrontendClientForMigration mocks base method.

type MockClientFactoryMockRecorder

type MockClientFactoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockClientFactoryMockRecorder is the mock recorder for MockClientFactory.

func (*MockClientFactoryMockRecorder) ElasticSearchClient

func (mr *MockClientFactoryMockRecorder) ElasticSearchClient(c interface{}) *gomock.Call

ElasticSearchClient indicates an expected call of ElasticSearchClient.

func (*MockClientFactoryMockRecorder) ServerAdminClient

func (mr *MockClientFactoryMockRecorder) ServerAdminClient(c interface{}) *gomock.Call

ServerAdminClient indicates an expected call of ServerAdminClient.

func (*MockClientFactoryMockRecorder) ServerAdminClientForMigration

func (mr *MockClientFactoryMockRecorder) ServerAdminClientForMigration(c interface{}) *gomock.Call

ServerAdminClientForMigration indicates an expected call of ServerAdminClientForMigration.

func (*MockClientFactoryMockRecorder) ServerConfig

func (mr *MockClientFactoryMockRecorder) ServerConfig(c interface{}) *gomock.Call

ServerConfig indicates an expected call of ServerConfig.

func (*MockClientFactoryMockRecorder) ServerFrontendClient

func (mr *MockClientFactoryMockRecorder) ServerFrontendClient(c interface{}) *gomock.Call

ServerFrontendClient indicates an expected call of ServerFrontendClient.

func (*MockClientFactoryMockRecorder) ServerFrontendClientForMigration

func (mr *MockClientFactoryMockRecorder) ServerFrontendClientForMigration(c interface{}) *gomock.Call

ServerFrontendClientForMigration indicates an expected call of ServerFrontendClientForMigration.

type MockLoadCloser

type MockLoadCloser struct {
	// contains filtered or unexported fields
}

MockLoadCloser is a mock of LoadCloser interface.

func NewMockLoadCloser

func NewMockLoadCloser(ctrl *gomock.Controller) *MockLoadCloser

NewMockLoadCloser creates a new mock instance.

func (*MockLoadCloser) Close

func (m *MockLoadCloser) Close()

Close mocks base method.

func (*MockLoadCloser) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockLoadCloser) Load

Load mocks base method.

type MockLoadCloserMockRecorder

type MockLoadCloserMockRecorder struct {
	// contains filtered or unexported fields
}

MockLoadCloserMockRecorder is the mock recorder for MockLoadCloser.

func (*MockLoadCloserMockRecorder) Close

func (mr *MockLoadCloserMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close.

func (*MockLoadCloserMockRecorder) Load

Load indicates an expected call of Load.

type MockManagerFactory

type MockManagerFactory struct {
	// contains filtered or unexported fields
}

MockManagerFactory is a mock of ManagerFactory interface.

func NewMockManagerFactory

func NewMockManagerFactory(ctrl *gomock.Controller) *MockManagerFactory

NewMockManagerFactory creates a new mock instance.

func (*MockManagerFactory) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

type MockManagerFactoryMockRecorder

type MockManagerFactoryMockRecorder struct {
	// contains filtered or unexported fields
}

MockManagerFactoryMockRecorder is the mock recorder for MockManagerFactory.

type MockPrinter

type MockPrinter struct {
	// contains filtered or unexported fields
}

MockPrinter is a mock of Printer interface.

func NewMockPrinter

func NewMockPrinter(ctrl *gomock.Controller) *MockPrinter

NewMockPrinter creates a new mock instance.

func (*MockPrinter) EXPECT

func (m *MockPrinter) EXPECT() *MockPrinterMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockPrinter) Print

func (m *MockPrinter) Print(arg0 io.Writer, arg1 []*persistence.TimerTaskInfo) error

Print mocks base method.

type MockPrinterMockRecorder

type MockPrinterMockRecorder struct {
	// contains filtered or unexported fields
}

MockPrinterMockRecorder is the mock recorder for MockPrinter.

func (*MockPrinterMockRecorder) Print

func (mr *MockPrinterMockRecorder) Print(arg0, arg1 interface{}) *gomock.Call

Print indicates an expected call of Print.

type Printer added in v0.14.0

type Printer interface {
	Print(output io.Writer, timers []*persistence.TimerTaskInfo) error
}

Printer prints timer task information

func NewHistogramPrinter added in v0.14.0

func NewHistogramPrinter(c *cli.Context, timeFormat string) Printer

NewHistogramPrinter creates a new Printer to display timer task information in a histogram

func NewJSONPrinter added in v0.14.0

func NewJSONPrinter(c *cli.Context) Printer

NewJSONPrinter creates a new Printer to display timer task information in a JSON format

type RenderOptions added in v0.24.0

type RenderOptions struct {
	// OptionalColumns may contain column header names which can be hidden
	OptionalColumns map[string]bool

	// Border specified whether to render table border
	Border bool

	// Custom, per column alignment
	ColumnAlignment []int

	// Color will use coloring characters while printing table
	Color bool

	// PrintRawTime will print time as int64 unix nanos
	PrintRawTime bool
	// PrintDateTime will print both date & time
	PrintDateTime bool

	// DefaultTemplate (if specified) will be used to render data when not --format flag is given
	DefaultTemplate string
}

RenderOptions allows passing optional flags for altering rendered table

type Reporter added in v0.14.0

type Reporter struct {
	// contains filtered or unexported fields
}

Reporter wraps LoadCloser, Printer and a filter on time task type and domainID

func NewReporter added in v0.14.0

func NewReporter(domain string, timerTypes []int, loader LoadCloser, printer Printer) *Reporter

NewReporter creates a new Reporter

func (*Reporter) Report added in v0.14.0

func (r *Reporter) Report(output io.Writer) error

Report loads, filters and prints timer tasks

type SearchAttributesRow added in v0.24.0

type SearchAttributesRow struct {
	Key       string `header:"Key"`
	ValueType string `header:"Value type"`
}

type SearchAttributesTable added in v0.24.0

type SearchAttributesTable []SearchAttributesRow

func (SearchAttributesTable) Len added in v0.24.0

func (s SearchAttributesTable) Len() int

func (SearchAttributesTable) Less added in v0.24.0

func (s SearchAttributesTable) Less(i, j int) bool

func (SearchAttributesTable) Swap added in v0.24.0

func (s SearchAttributesTable) Swap(i, j int)

type ShardRow added in v0.24.0

type ShardRow struct {
	ShardID  int32  `header:"ShardID"`
	Identity string `header:"Identity"`
}

type TaskListPartitionRow added in v0.24.0

type TaskListPartitionRow struct {
	ActivityPartition string `header:"Activity Task List Partition"`
	DecisionPartition string `header:"Decision Task List Partition"`
	Host              string `header:"Host"`
}

type TaskListPollerRow added in v0.24.0

type TaskListPollerRow struct {
	ActivityIdentity string    `header:"Activity Poller Identity"`
	DecisionIdentity string    `header:"Decision Poller Identity"`
	LastAccessTime   time.Time `header:"Last Access Time"`
}

type TaskListRow added in v0.24.0

type TaskListRow struct {
	Name        string `header:"Task List Name"`
	Type        string `header:"Type"`
	PollerCount int    `header:"Poller Count"`
}

type TaskListStatusRow added in v0.24.0

type TaskListStatusRow struct {
	ReadLevel int64   `header:"Read Level"`
	AckLevel  int64   `header:"Ack Level"`
	Backlog   int64   `header:"Backlog"`
	RPS       float64 `header:"RPS"`
	StartID   int64   `header:"Lease Start TaskID"`
	EndID     int64   `header:"Lease End TaskID"`
}

type ValidationDetails added in v1.2.1

type ValidationDetails struct {
	CurrentDomainRow            *types.DescribeDomainResponse
	NewDomainRow                *types.DescribeDomainResponse
	MismatchedDomainMetaData    string
	LongRunningWorkFlowNum      *int
	MismatchedDynamicConfig     []MismatchedDynamicConfig
	MissingCurrSearchAttributes []string
	MissingNewSearchAttributes  []string
}

type WorkflowRow added in v0.24.0

type WorkflowRow struct {
	WorkflowType     string                 `header:"Workflow Type" maxLength:"32"`
	WorkflowID       string                 `header:"Workflow ID"`
	RunID            string                 `header:"Run ID"`
	TaskList         string                 `header:"Task List"`
	IsCron           bool                   `header:"Is Cron"`
	StartTime        time.Time              `header:"Start Time"`
	ExecutionTime    time.Time              `header:"Execution Time"`
	EndTime          time.Time              `header:"End Time"`
	CloseStatus      string                 `header:"Close Status"`
	HistoryLength    int64                  `header:"History Length"`
	UpdateTime       time.Time              `header:"Update Time"`
	Memo             map[string]string      `header:"Memo"`
	SearchAttributes map[string]interface{} `header:"Search Attributes"`
}

WorkflowRow is a presentation layer entity use to render a table of workflows

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL