common

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2023 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Main command definitions
	WorkflowDefinition  = "Operations that can be performed on Workflows."
	ActivityDefinition  = "Operations that can be performed on Workflow Activities."
	TaskQueueDefinition = "Operations performed on Task Queues."
	ScheduleDefinition  = "Operations performed on Schedules."
	BatchDefinition     = "Operations performed on Batch jobs."
	OperatorDefinition  = "Operations performed on the Temporal Server."
	EnvDefinition       = "Manage environmental configurations on Temporal Client."

	// Workflow subcommand definitions
	StartWorkflowDefinition     = "Starts a new Workflow Execution."
	ExecuteWorkflowDefinition   = "Start a new Workflow Execution and prints its progress."
	DescribeWorkflowDefinition  = "Show information about a Workflow Execution."
	ListWorkflowDefinition      = "List Workflow Executions based on a Query."
	ShowWorkflowDefinition      = "Show Event History for a Workflow Execution."
	QueryWorkflowDefinition     = "Query a Workflow Execution."
	StackWorkflowDefinition     = "Query a Workflow Execution with __stack_trace as the query type."
	SignalWorkflowDefinition    = "Signal Workflow Execution by Id or List Filter."
	CountWorkflowDefinition     = "Count Workflow Executions (requires ElasticSearch to be enabled)."
	CancelWorkflowDefinition    = "Cancel a Workflow Execution."
	TerminateWorkflowDefinition = "Terminate Workflow Execution by Id or List Filter."
	DeleteWorkflowDefinition    = "Deletes a Workflow Execution."
	ResetWorkflowDefinition     = "Resets a Workflow Execution by Event Id or reset type."
	TraceWorkflowDefinition     = "Trace progress of a Workflow Execution and its children."

	// Activity subcommand definitions
	CompleteActivityDefinition = "Completes an Activity."
	FailActivityDefinition     = "Fails an Activity."

	// Task Queue subcommand definitions
	DescribeTaskQueueDefinition      = "Describes the Workers that have recently polled on this Task Queue."
	ListPartitionTaskQueueDefinition = "Lists the Task Queue's partitions and which matching node they are assigned to."

	// Batch subcommand definitions
	DescribeBatchJobDefinition  = "Describe a Batch operation job."
	ListBatchJobsDefinition     = "List Batch operation jobs."
	TerminateBatchJobDefinition = "Stop a Batch operation job."

	NamespaceDefinition       = "Operations applying to Namespaces."
	SearchAttributeDefinition = "Operations applying to Search Attributes."
	ClusterDefinition         = "Operations for running a Temporal Cluster."

	// Namespace subcommand definitions
	DescribeNamespaceDefinition = "Describe a Namespace by its name or Id."
	ListNamespacesDefinition    = "List all Namespaces."
	CreateNamespaceDefinition   = "Registers a new Namespace."
	UpdateNamespaceDefinition   = "Updates a Namespace."
	DeleteNamespaceDefinition   = "Deletes an existing Namespace."

	// Search Attribute subcommand defintions
	CreateSearchAttributeDefinition  = "Adds one or more custom Search Attributes."
	ListSearchAttributesDefinition   = "Lists all Search Attributes that can be used in list Workflow Queries."
	RemoveSearchAttributesDefinition = "Removes custom search attribute metadata only (Elasticsearch index schema is not modified)."

	// Cluster subcommand defintions
	HealthDefinition   = "Checks the health of the Frontend Service."
	DescribeDefinition = "Show information about the Cluster."
	SystemDefinition   = "Shows information about the system and its capabilities."
	UpsertDefinition   = "Add or update a remote Cluster."
	ListDefinition     = "List all remote Clusters."
	RemoveDefinition   = "Remove a remote Cluster."

	// Env subcommand definitions
	GetDefinition    = "Prints environmental properties."
	SetDefinition    = "Set environmental properties."
	DeleteDefinition = "Delete an environment or environmental property."

	// Schedule definitions
	ScheduleCreateDefinition   = "Create a new Schedule."
	ScheduleCreateDescription  = "Takes a Schedule specification plus all the same args as starting a Workflow."
	ScheduleUpdateDefinition   = "Updates a Schedule with a new definition (full replacement, not patch)."
	ScheduleUpdateDescription  = "Takes a Schedule specification plus all the same args as starting a Workflow."
	ScheduleToggleDefinition   = "Pauses or unpauses a Schedule."
	ScheduleTriggerDefinition  = "Triggers an immediate action."
	ScheduleBackfillDefinition = "Backfills a past time range of actions."
	ScheduleDescribeDefinition = "Get Schedule configuration and current state."
	ScheduleDeleteDefinition   = "Deletes a Schedule."
	ScheduleListDefinition     = "Lists Schedules."
)
View Source
const (
	// Shared flag definitions
	FlagEnvDefinition            = "Name of the environment to read environmental variables from."
	FlagAddrDefinition           = "The host and port (formatted as host:port) for the Temporal Frontend Service."
	FlagNSAliasDefinition        = "Identifies a Namespace in the Temporal Workflow."
	FlagMetadataDefinition       = "Contains gRPC metadata to send with requests (format: key=value). Values must be in a valid JSON format."
	FlagTLSCertPathDefinition    = "Path to x509 certificate."
	FlagTLSKeyPathDefinition     = "Path to private certificate key."
	FlagTLSCaPathDefinition      = "Path to server CA certificate."
	FlagTLSDisableHVDefinition   = "Disables TLS host name verification if already enabled."
	FlagTLSServerNameDefinition  = "Provides an override for the target TLS server name."
	FlagContextTimeoutDefinition = "An optional timeout for the context of an RPC call (in seconds)."
	FlagCodecEndpointDefinition  = "Endpoint for a remote Codec Server."
	FlagCodecAuthDefinition      = "Sets the authorization header on requests to the Codec Server."
	FlagArchiveDefinition        = "List archived Workflow Executions. Currently an experimental feature."

	// Execution flags
	FlagWorkflowId           = "Workflow Id"
	FlagRunIdDefinition      = "Run Id"
	FlagJobIDDefinition      = "Batch Job Id"
	FlagScheduleIDDefinition = "Schedule Id"

	// ShowWorkflow flags
	FlagOutputFilenameDefinition  = "Serializes Event History to a file."
	FlagMaxFieldLengthDefinition  = "Maximum length for each attribute field."
	FlagResetPointsOnlyDefinition = "Only show Workflow Events that are eligible for reset."
	FlagFollowAliasDefinition     = "Follow the progress of a Workflow Execution."

	// StartWorkflow flags
	FlagWFTypeDefinition                   = "Workflow type name."
	FlagTaskQueueDefinition                = "Task Queue"
	FlagWorkflowRunTimeoutDefinition       = "Timeout (in seconds) of a single Workflow run."
	FlagWorkflowExecutionTimeoutDefinition = "Timeout (in seconds) for a WorkflowExecution, including retries and continue-as-new tasks."
	FlagWorkflowTaskTimeoutDefinition      = "Start-to-close timeout for a Workflow Task (in seconds)."
	FlagCronScheduleDefinition             = "Optional Cron Schedule for the Workflow. Cron spec is formatted as: \n" +
		"\t┌───────────── minute (0 - 59) \n" +
		"\t│ ┌───────────── hour (0 - 23) \n" +
		"\t│ │ ┌───────────── day of the month (1 - 31) \n" +
		"\t│ │ │ ┌───────────── month (1 - 12) \n" +
		"\t│ │ │ │ ┌───────────── day of the week (0 - 6) (Sunday to Saturday) \n" +
		"\t│ │ │ │ │ \n" +
		"\t* * * * *"
	FlagWorkflowIdReusePolicyDefinition = "" /* 147-byte string literal not displayed */
	FlagInputDefinition                 = "Optional JSON input to provide to the Workflow. Pass \"null\" for null values."
	FlagInputFileDefinition             = "" /* 196-byte string literal not displayed */
	FlagSearchAttributeDefinition       = "Passes Search Attribute in key=value format. Use valid JSON formats for value."
	FlagMemoDefinition                  = "Passes a memo in key=value format. Use valid JSON formats for value."
	FlagMemoFileDefinition              = "Passes a memo as file input, with each line following key=value format. Use valid JSON formats for value."

	// Other Workflow flags
	FlagResetPointsUsage           = "Only show auto-reset points."
	FlagPrintRawUsage              = "Print properties as they are stored."
	QueryFlagTypeUsage             = "The Query type you want to run."
	FlagWorkflowSignalUsage        = "Signal Workflow Execution by Id."
	FlagQueryDefinition            = "Signal Workflow Executions by List Filter. See https://docs.temporal.io/concepts/what-is-a-list-filter/."
	FlagSignalName                 = "Signal Name"
	FlagInputSignal                = "Input for the Signal (JSON)."
	FlagInputFileSignal            = "Input for the Signal from file (JSON)."
	FlagCancelWorkflow             = "Cancel Workflow Execution by Id."
	FlagWorkflowIDTerminate        = "Terminate Workflow Execution by Id."
	FlagQueryTerminate             = "Terminate Workflow Executions by List Filter. See https://docs.temporal.io/concepts/what-is-a-list-filter/."
	FlagEventIDDefinition          = "" /* 149-byte string literal not displayed */
	FlagQueryResetBatch            = "" /* 144-byte string literal not displayed */
	FlagInputFileReset             = "" /* 133-byte string literal not displayed */
	FlagExcludeFileDefinition      = "Input file that specifies Workflow Executions to exclude from resetting."
	FlagInputSeparatorDefinition   = "Separator for the input file. The default is a tab (\t)."
	FlagParallelismDefinition      = "Number of goroutines to run in parallel. Each goroutine processes one line for every second."
	FlagSkipCurrentOpenDefinition  = "Skip a Workflow Execution if the current Run is open for the same Workflow Id as the base Run."
	FlagSkipBaseDefinition         = "Skip a Workflow Execution if the base Run is not the current Run."
	FlagNonDeterministicDefinition = "Reset Workflow Execution only if its last Event is WorkflowTaskFailed with a nondeterministic error."
	FlagDryRunDefinition           = "Simulate reset without resetting any Workflow Executions."
	FlagDepthDefinition            = "Number of Child Workflows to expand, -1 to expand all Child Workflows."
	FlagConcurrencyDefinition      = "Request concurrency."
	FlagNoFoldDefinition           = "Disable folding. All Child Workflows within the set depth will be fetched and displayed."

	// Stack trace query flag definitions
	FlagQueryRejectConditionDefinition = "Optional flag for rejecting Queries based on Workflow state. Valid values are \"not_open\" and \"not_completed_cleanly\"."

	// Pagination flag definitions
	FlagLimitDefinition   = "Number of items to print."
	FlagPagerDefinition   = "Sets the pager for Temporal CLI to use (options: less, more, favoritePager)."
	FlagNoPagerDefinition = "Disables the interactive pager."
	FlagFieldsDefinition  = "Customize fields to print. Set to 'long' to automatically print more of main fields."

	// Activity flag definitions
	FlagWorkflowIDDefinition = "Identifies the Workflow that the Activity is running on."
	FlagRunIDDefinition      = "Identifies the current Workflow Run."
	FlagActivityIDDefinition = "Identifies the Activity Execution."
	FlagResultDefinition     = "Set the result value of Activity completion."
	FlagIdentityDefinition   = "Specify operator's identity."

	FlagDetailDefinition = "Detail to fail the Activity."

	FlagReasonDefinition = "Reason to perform a given operation on the Cluster."

	// Cluster flag definition
	FlagClusterAddressDefinition          = "Frontend address of the remote Cluster."
	FlagClusterEnableConnectionDefinition = "Enable cross-cluster connection."
	FlagNameDefinition                    = "Frontend address of the remote Cluster."

	// Schedule flag definition
	FlagOverlapPolicyDefinition           = "Overlap policy (options: Skip, BufferOne, BufferAll, CancelOther, TerminateOther, AllowAll)."
	FlagCalenderDefinition                = `Calendar specification in JSON ({"dayOfWeek":"Fri","hour":"17","minute":"5"}) or as a Cron string ("30 2 * * 5" or "@daily").`
	FlagIntervalDefinition                = "Interval duration, e.g. 90m, or 90m/13m to include phase offset."
	FlagStartTimeDefinition               = "Overall schedule start time."
	FlagEndTimeDefinition                 = "Overall schedule end time."
	FlagJitterDefinition                  = "Jitter duration."
	FlagTimeZoneDefinition                = "Time zone (IANA name)."
	FlagNotesDefinition                   = "Initial value of notes field."
	FlagPauseDefinition                   = "Initial value of paused state."
	FlagRemainingActionsDefinition        = "Total number of actions allowed."
	FlagCatchupWindowDefinition           = "Maximum allowed catch-up time if server is down."
	FlagPauseOnFailureDefinition          = "Pause schedule after any workflow failure."
	FlagSearchAttributeScheduleDefinition = "Set Search Attribute on a schedule (format: key=value). Use valid JSON formats for value."
	FlagMemoScheduleDefinition            = "Set a memo on a schedule (format: key=value). Use valid JSON formats for value."
	FlagMemoFileScheduleDefinition        = "Set a memo from a file. Each line should follow the format key=value. Use valid JSON formats for value."
	FlagPauseScheduleDefinition           = "Pauses the Schedule."
	FlagUnpauseDefinition                 = "Unpauses the Schedule."
	FlagBackfillStartTime                 = "Backfill start time."
	FlagBackfillEndTime                   = "Backfill end time."
	FlagPrintRawDefinition                = "Print raw data as json (prefer this over -o json for scripting)."

	// Search Attribute flags
	FlagNameSearchAttribute = "Search Attribute name."
	FlagYesDefinition       = "Confirm all prompts."

	// Task Queue flags
	FlagTaskQueueName           = "Task Queue name."
	FlagTaskQueueTypeDefinition = "Task Queue type [workflow|activity]"
)
View Source
const (
	LocalHostPort = "127.0.0.1:7233"

	DefaultContextTimeoutForListArchivedWorkflow = 3 * time.Minute

	DefaultNamespaceRetention = 3 * 24 * time.Hour

	DefaultWorkflowIDReusePolicy = enumspb.WORKFLOW_ID_REUSE_POLICY_ALLOW_DUPLICATE

	ShowErrorStackEnv = `TEMPORAL_CLI_SHOW_STACKS`
)
View Source
const ActivityUsageText = `Activity commands operate on [Activity Executions](/concepts/what-is-an-activity-execution).`
View Source
const BatchUsageText = `Batch commands allow you to change multiple [Workflow Executions](/concepts/what-is-a-workflow-execution) without having to repeat yourself on the command line. 
In order to do this, you provide the command with a [List Filter](/concepts/what-is-visibility) and the type of Batch job to execute.

The List Filter identifies the Workflow Executions that will be affected by the Batch job.
The Batch type determines the other parameters that need to be provided, along with what is being affected on the Workflow Executions.

To start the Batch job, run ` + "`" + `temporal workflow query` + "`" + `.
Running Signal, Terminate, or Cancel with the ` + "`" + `--query` + "`" + ` modifier will start a Batch job automatically.

A successfully started Batch job will return a Job ID.
Use this Job ID to execute other actions on the Batch job.`
View Source
const CancelWorkflowUsageText = `The ` + "`" + `temporal workflow cancel` + "`" + ` command cancels a [Workflow Execution](/concepts/what-is-a-workflow-execution).

Canceling a running Workflow Execution records a [` + "`" + `WorkflowExecutionCancelRequested` + "`" + ` event](/references/events#workflow-execution-cancel-requested) in the [Event History](/concepts/what-is-an-event-history).
A new [Command](/concepts/what-is-a-command) Task will be scheduled, and the Workflow Execution performs cleanup work.

Use the options listed below to change the behavior of this command.
Make sure to write the command as follows:
` + "`" + `temporal workflow cancel [command options]` + "`"
View Source
const ClusterDescribeUsageText = `The ` + "`" + `temporal operator cluster describe` + "`" + ` command shows information about the [Cluster](/concepts/what-is-a-temporal-cluster).

Use the options listed below to change the output of this command.
Make sure to write the command as follows:
` + "`" + `temporal operator cluster describe [command options]` + "`"
View Source
const ClusterListUsageText = `The ` + "`" + `temporal operator cluster list` + "`" + ` command prints a list of all remote [Clusters](/concepts/what-is-a-temporal-cluster) on the system.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator cluster list [command options]` + "`"
View Source
const ClusterRemoveUsageText = `The ` + "`" + `temporal operator cluster remove` + "`" + ` command removes a remote [Cluster](/concepts/what-is-a-temporal-cluster) from the system.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator cluster remove [command options]` + "`"
View Source
const ClusterSystemUsageText = `The ` + "`" + `temporal operator cluster system` + "`" + ` command provides information about the system the Cluster is running on.

Use the options listed below to change this command's output.
Make sure to write the command as follows:
` + "`" + `temporal operator cluster system [command options]` + "`"
View Source
const ClusterUpsertUsageText = `The ` + "`" + `temporal operator cluster upsert` + "`" + ` command allows the user to add or update a remote [Cluster](/concepts/what-is-a-temporal-cluster).

Use the options listed below to change the behavior of this command.
Make sure to write the command as follows:
` + "`" + `temporal operator cluster upsert [command options]` + "`"
View Source
const ClusterUsageText = `Cluster commands enabled operations on [Temporal Clusters](/concepts/what-is-a-temporal-cluster).`
View Source
const CompleteActivityUsageText = `The ` + "`" + `temporal activity complete` + "`" + ` command completes an [Activity Execution](/concepts/what-is-an-activity-execution).

Use the options listed below to change the behavior of this command.
Make sure to write the command as follows:
` + "`" + `temporal activity complete [command options] ` + "`"
View Source
const CustomTemplateHelpCLI = `` /* 357-byte string literal not displayed */
View Source
const DescribeBatchUsageText = `The ` + "`" + `temporal batch describe` + "`" + ` command shows the progress of an ongoing Batch job.

Use the command options listed below to change the information returned by this command.
Make sure to write the command in this format:
` + "`" + `temporal batch describe [command options]` + "`"
View Source
const DescribeTaskQueueUsageText = `The ` + "`" + `temporal task-queue describe` + "`" + ` command provides [poller](/application-development/worker-performance#poller-count) information for a given [Task Queue](/concepts/what-is-a-task-queue).

The [Server](/concepts/what-is-the-temporal-server) records the last time of each poll request.
Should ` + "`" + `LastAccessTime` + "`" + ` exceeds one minute, it's likely that the Worker is at capacity (all Workflow and Activity slots are full) or that the Worker has shut down.
[Workers](/concepts/what-is-a-worker) are removed if 5 minutes have passed since the last poll request.

Use the options listed below to modify what this command returns.
Make sure to write the command as follows:
` + "`" + `temporal task-queue describe [command options]` + "`"
View Source
const DescribeWorkflowUsageText = `The ` + "`" + `temporal workflow describe` + "`" + ` command shows information about a given [Workflow Execution](/concepts/what-is-a-workflow-execution).
This information can be used to locate Workflow Executions that weren't able to run successfully.

Use the command options listed below to change the information returned by this command.
Make sure to write the command in this format:
` + "`" + `temporal workflow describe [command options]` + "`"
View Source
const EnvDeleteUsageText = `The ` + "`" + `temporal env delete` + "`" + ` command deletes a given environment or environmental property.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal env delete [command options]` + "`"
View Source
const EnvGetUsageText = `The ` + "`" + `temporal env get` + "`" + ` command prints the environmental properties for the environment in use.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal env get [command options] [arguments]` + "`"
View Source
const EnvSetUsageText = `The ` + "`" + `temporal env set` + "`" + ` command sets the value for an environmental property.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal env set [command options] [arguments]` + "`"
View Source
const EnvUsageText = `Environment (or 'env') commands allow the user to configure the properties for the environment in use.`
View Source
const ExecuteWorkflowUsageText = `The ` + "`" + `temporal workflow execute` + "`" + ` command starts a new [Workflow Execution](/concepts/what-is-a-workflow-execution) and prints its progress.
The command doesn't finish until the [Workflow](/concepts/what-is-a-workflow) completes.

Single quotes('') are used to wrap input as JSON.

Use the command options listed below to change how the Workflow Execution behaves during its run.
Make sure to write the command in this format:
` + "`" + `temporal workflow execute [command options]` + "`"
View Source
const FailActivityUsageText = `The ` + "`" + `temporal activity fail` + "`" + ` command fails an [Activity Execution](/concepts/what-is-an-activity-execution).

Use the options listed below to change the behavior of this command.
Make sure to write the command as follows:
` + "`" + `temporal activity fail [command options]` + "`"
View Source
const HealthUsageText = `The ` + "`" + `temporal operator cluster health` + "`" + ` command checks the health of the [Frontend Service](/concepts/what-is-a-frontend-service).

Use the options listed below to change the behavior and output of this command.
Make sure to write the command as follows:
` + "`" + `temporal operator cluster health [command options]` + "`"
View Source
const ListBatchUsageText = `When used, ` + "`" + `temporal batch list` + "`" + ` returns all Batch jobs. 

Use the command options listed below to change the information returned by this command.
Make sure to write the command in this format:
` + "`" + `temporal batch list [command options] ` + "`"
View Source
const ListWorkflowUsageText = `The ` + "`" + `temporal workflow list` + "`" + ` command provides a list of [Workflow Executions](/concepts/what-is-a-workflow-execution) that meet the criteria of a given [Query](/concepts/what-is-a-query).
By default, this command returns a list of up to 10 closed Workflow Executions.

Use the command options listed below to change the information returned by this command.
Make sure to write the command as follows:
` + "`" + `temporal workflow list [command options]` + "`"
View Source
const NamespaceCreateUsageText = `The ` + "`" + `temporal operator namespace create` + "`" + ` command creates a new [Namespace](/concepts/what-is-a-namespace).

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator namespace create [command options] [arguments]` + "`"
View Source
const NamespaceDeleteUsageText = `The ` + "`" + `temporal operator namespace delete` + "`" + ` command deletes a given [Namespace](/concepts/what-is-a-namespace) from the system.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator namespace delete [command options] [arguments]` + "`"
View Source
const NamespaceDescribeUsageText = `The ` + "`" + `temporal operator namespace describe` + "`" + ` command provides a description of a [Namespace](/concepts/what-is-a-namespace).
Namespaces can be identified by name or Namespace ID.

Use the options listed below to change the command's output.
Make sure to write the command as follows:
` + "`" + `temporal operator namespace describe [command options] [arguments]` + "`"
View Source
const NamespaceListUsageText = `The ` + "`" + `temporal operator namespace list` + "`" + ` command lists all [Namespaces](/namespaces) on the [Server](/concepts/what-is-a-frontend-service).

Use the options listed below to change the command's output.
Make sure to write the command as follows:
` + "`" + `temporal operator namespace list [command options]` + "`"
View Source
const NamespaceUpdateUsageText = `The ` + "`" + `temporal operator namespace update` + "`" + ` command updates a given [Namespace](/concepts/what-is-a-namespace).

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator namespace update [command options] [arguments]` + "`"
View Source
const NamespaceUsageText = `` /* 160-byte string literal not displayed */
View Source
const OperatorUsageText = `Operator commands enable actions on [Namespaces](/concepts/what-is-a-namespace), [Search Attributes](/concepts/what-is-a-search-attribute), and [Temporal Clusters](/concepts/what-is-a-temporal-cluster).
These actions are performed through subcommands for each Operator area.

To run an Operator command, run ` + "`" + `temporal operator [command] [subcommand] [command options]` + "`" + `.
`
View Source
const QueryWorkflowUsageText = `The ` + "`" + `temporal workflow query` + "`" + ` command sends a [Query](/concepts/what-is-a-query) to a [Workflow Execution](/concepts/what-is-a-workflow-execution).

Queries can retrieve all or part of the Workflow state within given parameters.
Queries can also be used on completed [Workflows](/concepts/what-is-a-workflow-execution).

Use the command options listed below to change the information returned by this command.
Make sure to write the command as follows:
` + "`" + `temporal workflow query [command options]` + "`"
View Source
const ResetBatchUsageText = `The ` + "`" + `temporal workflow reset-batch` + "`" + ` command resets a batch of [Workflow Executions](/concepts/what-is-a-workflow-execution) by ` + "`" + `resetType` + "`" + `.
Resetting a [Workflow](/concepts/what-is-a-workflow) allows the process to resume from a certain point without losing your parameters or [Event History](/concepts/what-is-an-event-history).

Use the options listed below to change reset behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow reset-batch [command options]` + "`"
View Source
const ResetWorkflowUsageText = `The ` + "`" + `temporal workflow reset` + "`" + ` command resets a [Workflow Execution](/concepts/what-is-a-workflow-execution).
A reset allows the Workflow to be resumed from a certain point without losing your parameters or [Event History](/concepts/what-is-an-event-history).

Use the options listed below to change reset behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow reset [command options]` + "`"
View Source
const ScheduleBackfillUsageText = `The ` + "`" + `temporal schedule backfill` + "`" + ` command executes Actions ahead of their specified time range. 
Backfilling can be used to fill in [Workflow Runs](/concepts/what-is-a-run-id) from a time period when the Schedule was paused, or from before the Schedule was created. 

` + "`" + `` + "`" + `` + "`" + `
temporal schedule backfill --sid 'your-schedule-id' \
		--overlap-policy 'BufferAll' 				\
		--start-time '2022-05-0101T00:00:00Z'		\
		--end-time '2022-05-31T23:59:59Z'
` + "`" + `` + "`" + `` + "`" + `

Use the options provided below to change this command's behavior.`
View Source
const ScheduleCreateUsageText = `The ` + "`" + `temporal schedule create` + "`" + ` command creates a new [Schedule](/concepts/what-is-a-schedule).
Newly created Schedules return a Schedule ID to be used in other Schedule commands.

Schedules need to follow a format like the example shown here:
` + "`" + `` + "`" + `` + "`" + `
temporal schedule create \
		--sid 'your-schedule-id' \
		--cron '3 11 * * Fri' \
		--wid 'your-workflow-id' \
		--tq 'your-task-queue' \
		--type 'YourWorkflowType' 
` + "`" + `` + "`" + `` + "`" + `

Any combination of ` + "`" + `--cal` + "`" + `, ` + "`" + `--interval` + "`" + `, and ` + "`" + `--cron` + "`" + ` is supported.
Actions will be executed at any time specified in the Schedule.

Use the options provided below to change the command's behavior.`
View Source
const ScheduleDeleteUsageText = `The ` + "`" + `temporal schedule delete` + "`" + ` command deletes a [Schedule](/concepts/what-is-a-schedule).
Deleting a Schedule does not affect any [Workflows](/concepts/what-is-a-workflow) started by the Schedule.

[Workflow Executions](/concepts/what-is-a-workflow-execution) started by Schedules can be cancelled or terminated like other Workflow Executions.
However, Workflow Executions started by a Schedule can be identified by their [Search Attributes](/concepts/what-is-a-search-attribute), making them targetable by batch command for termination.

` + "`" + `temporal schedule delete --sid 'your-schedule-id' [command options] ` + "`" + `

Use the options below to change the behavior of this command.`
View Source
const ScheduleDescribeUsageText = `The ` + "`" + `temporal schedule describe` + "`" + ` command shows the current [Schedule](/concepts/what-is-a-schedule) configuration.
This command also provides information about past, current, and future [Workflow Runs](/concepts/what-is-a-run-id).

` + "`" + `temporal schedule describe --sid 'your-schedule-id' [command options] ` + "`" + `

Use the options below to change this command's output.`
View Source
const ScheduleListUsageText = `The ` + "`" + `temporal schedule list` + "`" + ` command lists all [Schedule](/concepts/what-is-a-schedule) configurations.
Listing Schedules in [Standard Visibility](/concepts/what-is-standard-visibility) will only provide Schedule IDs.

` + "`" + `temporal schedule list [command options] ` + "`" + `

Use the options below to change the behavior of this command.`
View Source
const ScheduleToggleUsageText = `The ` + "`" + `temporal schedule toggle` + "`" + ` command can pause and unpause a [Schedule](/concepts/what-is-a-schedule).

Toggling a Schedule requires a reason to be entered on the command line. 
Use ` + "`" + `--reason` + "`" + ` to note the issue leading to the pause or unpause.

Schedule toggles are passed in this format:
` + "`" + ` temporal schedule toggle --sid 'your-schedule-id' --pause --reason "paused because the database is down"` + "`" + `
` + "`" + `temporal schedule toggle --sid 'your-schedule-id' --unpause --reason "the database is back up"` + "`" + `

Use the options provided below to change this command's behavior.`
View Source
const ScheduleTriggerUsageText = `The ` + "`" + `temporal schedule trigger` + "`" + ` command triggers an immediate action with a given [Schedule](/concepts/what-is-a-schedule).
By default, this action is subject to the Overlap Policy of the Schedule.

` + "`" + `temporal schedule trigger` + "`" + ` can be used to start a Workflow Run immediately.
` + "`" + `temporal schedule trigger --sid 'your-schedule-id'` + "`" + ` 

The Overlap Policy of the Schedule can be overridden as well.
` + "`" + `temporal schedule trigger --sid 'your-schedule-id' --overlap-policy 'AllowAll'` + "`" + `

Use the options provided below to change this command's behavior.`
View Source
const ScheduleUpdateUsageText = `The ` + "`" + `temporal schedule update` + "`" + ` command updates an existing [Schedule](/concepts/what-is-a-schedule).

Like ` + "`" + `temporal schedule create` + "`" + `, updated Schedules need to follow a certain format:
` + "`" + `` + "`" + `` + "`" + `
temporal schedule update 			\
		--sid 'your-schedule-id' 	\
		--cron '3 11 * * Fri' 		\
		--wid 'your-workflow-id' 	\
		--tq 'your-task-queue' 		\
		--type 'YourWorkflowType' 
` + "`" + `` + "`" + `` + "`" + `

Updating a Schedule takes the given options and replaces the entire configuration of the Schedule with what's provided. 
If you only change one value of the Schedule, be sure to provide the other unchanged fields to prevent them from being overwritten.

Use the options provided below to change the command's behavior.`
View Source
const ScheduleUsageText = `Schedule commands allow the user to create, use, and update [Schedules](/concepts/what-is-a-schedule).
Schedules control when certain Actions for a Workflow Execution are performed, making it a useful tool for automation.

To run a Schedule command, run ` + "`" + `temporal schedule [command] [command options]` + "`" + `.
`
View Source
const SearchAttributeCreateUsageText = `The ` + "`" + `temporal operator search-attribute create` + "`" + ` command adds one or more custom [Search Attributes](/concepts/what-is-a-search-attribute).
These Search Attributes can be used to [filter a list](/concepts/what-is-a-list-filter) of [Workflow Executions](/concepts/what-is-a-workflow-execution) that contain the given Search Attributes in their metadata.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator search-attribute create [command options] ` + "`"
View Source
const SearchAttributeListUsageText = `The ` + "`" + `temporal operator search-attrbute list` + "`" + ` command displays a list of all [Search Attributes](/concepts/what-is-a-search-attribute) that can be used in ` + "`" + ` temporal workflow list --query` + "`" + `.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator search-attribute list [command options] ` + "`"
View Source
const SearchAttributeRemoveUsageText = `The ` + "`" + `temporal operator search-attribute remove` + "`" + ` command removes custom [Search Attribute](/concepts/what-is-a-search-attribute) metadata.
This command does not remove custom Search Attributes from Elasticsearch.
The index schema is not modified.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal operator search-attribute remove [command options]` + "`"
View Source
const SearchAttributeUsageText = `` /* 144-byte string literal not displayed */
View Source
const ServerUsageText = `Server commands allow you to start and manage the [Temporal Server](/concepts/what-is-the-temporal-server) from the command line.

Currently, ` + "`" + `cli` + "`" + ` server functionality extends to starting the Server. 
`
View Source
const StartDevUsageText = `The ` + "`" + `temporal server start-dev` + "`" + ` command starts the Temporal Server on ` + "`" + `localhost:7233` + "`" + `.
The results of any command run on the Server can be viewed at http://localhost:7233.
`
View Source
const StartWorkflowUsageText = `The ` + "`" + `temporal workflow start` + "`" + ` command starts a new [Workflow Execution](/concepts/what-is-a-workflow-execution).
When invoked successfully, the Workflow and Run ID are returned immediately after starting the [Workflow](/concepts/what-is-a-workflow).

Use the command options listed below to change how the Workflow Execution behaves upon starting.
Make sure to write the command in this format:
` + "`" + `temporal workflow start [command options]` + "`"
View Source
const TaskQueueListPartitionUsageText = `The ` + "`" + `temporal task-queue list-partition` + "`" + ` command displays the partitions of a [Task Queue](/concepts/what-is-a-task-queue), along with the matching node they are assigned to.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal task-queue list-partition [command options]` + "`"
View Source
const TaskQueueUsageText = `Task Queue commands allow operations to be performed on [Task Queues](/concepts/what-is-a-task-queue).
`
View Source
const TerminateBatchUsageText = `The ` + "`" + `temporal batch terminate` + "`" + ` command terminates a Batch job with the provided Job ID. 

Use the command options listed below to change the behavior of this command.
Make sure to write the command as follows:
` + "`" + `temporal batch terminate [command options] ` + "`"
View Source
const TerminateWorkflowUsageText = `The ` + "`" + `temporal workflow terminate` + "`" + ` command terminates a [Workflow Execution](/concepts/what-is-a-workflow-execution)

Terminating a running Workflow Execution records a [` + "`" + `WorkflowExecutionTerminated` + "`" + ` event](/references/events#workflowexecutionterminated) as the closing Event in the [Event History](/concepts/what-is-an-event-history).
Any further [Command](/concepts/what-is-a-command) Tasks cannot be scheduled after running this command.

Use the options listed below to change termination behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow terminate [command options]` + "`"
View Source
const WorkflowCountUsageText = `The ` + "`" + `temporal workflow count` + "`" + ` command returns a count of [Workflow Executions](/concepts/what-is-a-workflow-execution).
This command requires Elasticsearch to be enabled.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow count [command options]` + "`"
View Source
const WorkflowDeleteUsageText = `The ` + "`" + `temporal workflow delete` + "`" + ` command deletes the specified [Workflow Execution](/concepts/what-is-a-workflow-execution).

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow delete [command options]` + "`"
View Source
const WorkflowShowUsageText = `The ` + "`" + `temporal workflow show` + "`" + ` command provides the [Event History](/concepts/what-is-an-event-history) for a specified [Workflow Execution](/concepts/what-is-a-workflow-execution).

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow show [command options]` + "`"
View Source
const WorkflowSignalUsageText = `The ` + "`" + `temporal workflow signal` + "`" + ` command is used to [Signal](/concepts/what-is-a-signal) a [Workflow Execution](/concepts/what-is-a-workflow-execution) by ID or [List Filter](/concepts/what-is-a-list-filter).

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow signal [command options]` + "`"
View Source
const WorkflowStackUsageText = `The ` + "`" + `temporal workflow stack` + "`" + ` command queries a [Workflow Execution](/concepts/what-is-a-workflow-execution) with ` + "`" + `--stack-trace` + "`" + ` as the [Query](/concepts/what-is-a-query#stack-trace-query) type.
Returning the stack trace of all the threads owned by a Workflow Execution can be great for troubleshooting in production.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow stack [command options]` + "`"
View Source
const WorkflowTraceUsageText = `The ` + "`" + `temporal workflow trace` + "`" + ` command tracks the progress of a [Workflow Execution](/concepts/what-is-a-workflow-execution) and any  [Child Workflows](/concepts/what-is-a-child-workflow-execution) it generates.

Use the options listed below to change the command's behavior.
Make sure to write the command as follows:
` + "`" + `temporal workflow trace [command options]` + "`"
View Source
const WorkflowUsageText = `Workflow commands allow operations to be performed on [Workflow Executions](/concepts/what-is-a-workflow-execution).
`

Variables

View Source
var (
	CategoryClient  = "Client Options:"
	CategoryDisplay = "Display Options:"
	CategoryMain    = "Main Options:"
)

Categories used to structure --help output

View Source
var (
	FlagActiveCluster              = "active-cluster"
	FlagActivityID                 = "activity-id"
	FlagAddress                    = "address"
	FlagArchive                    = "archived"
	FlagCalendar                   = "calendar"
	FlagCatchupWindow              = "catchup-window"
	FlagCluster                    = "cluster"
	FlagClusterAddress             = "frontend-address"
	FlagClusterEnableConnection    = "enable-connection"
	FlagCodecAuth                  = "codec-auth"
	FlagCodecEndpoint              = "codec-endpoint"
	FlagConcurrency                = "concurrency"
	FlagConfig                     = "config"
	FlagContextTimeout             = "context-timeout"
	FlagCronSchedule               = "cron"
	FlagDBPath                     = "db-filename"
	FlagDepth                      = "depth"
	FlagDescription                = "description"
	FlagDetail                     = "detail"
	FlagDryRun                     = "dry-run"
	FlagDynamicConfigValue         = "dynamic-config-value"
	FlagEndTime                    = "end-time"
	FlagEnv                        = "env"
	FlagEventID                    = "event-id"
	FlagExcludeFile                = "exclude-file"
	FlagFold                       = "fold"
	FlagFollowAlias                = []string{"f"}
	FlagHeadless                   = "headless"
	FlagHistoryArchivalState       = "history-archival-state"
	FlagHistoryArchivalURI         = "history-uri"
	FlagIdentity                   = "identity"
	FlagInput                      = "input"
	FlagInputAlias                 = []string{"i"}
	FlagInputFile                  = "input-file"
	FlagInputSeparator             = "input-separator"
	FlagInterval                   = "interval"
	FlagIP                         = "ip"
	FlagIsGlobalNamespace          = "global"
	FlagJitter                     = "jitter"
	FlagJobID                      = "job-id"
	FlagLogFormat                  = "log-format"
	FlagLogLevel                   = "log-level"
	FlagMaxFieldLength             = "max-field-length"
	FlagMemo                       = "memo"
	FlagMemoFile                   = "memo-file"
	FlagMetadata                   = "grpc-meta"
	FlagMetricsPort                = "metrics-port"
	FlagName                       = "name"
	FlagNamespace                  = "namespace"
	FlagNamespaceAlias             = []string{"n"}
	FlagNamespaceData              = "data"
	FlagNamespaceID                = "namespace-id"
	FlagNoFold                     = "no-fold"
	FlagNonDeterministic           = "non-deterministic"
	FlagNotes                      = "notes"
	FlagOutputAlias                = []string{"o"}
	FlagOverlapPolicy              = "overlap-policy"
	FlagOwnerEmail                 = "email"
	FlagParallelism                = "input-parallelism"
	FlagPause                      = "pause"
	FlagPauseOnFailure             = "pause-on-failure"
	FlagPort                       = "port"
	FlagPragma                     = "sqlite-pragma"
	FlagPrintRaw                   = "raw"
	FlagPromoteNamespace           = "promote-global"
	FlagQuery                      = "query"
	FlagQueryAlias                 = []string{"q"}
	FlagQueryRejectCondition       = "reject-condition"
	FlagQueryUsage                 = "Filter results using an SQL-like query. See https://docs.temporal.io/docs/tctl/workflow/list#--query for more information."
	FlagReason                     = "reason"
	FlagRemainingActions           = "remaining-actions"
	FlagResetPointsOnly            = "reset-points"
	FlagResetReapplyType           = "reapply-type"
	FlagResult                     = "result"
	FlagRetention                  = "retention"
	FlagRPS                        = "rps"
	FlagRunID                      = "run-id"
	FlagRunIDAlias                 = []string{"r"}
	FlagScheduleID                 = "schedule-id"
	FlagScheduleIDAlias            = []string{"s"}
	FlagSearchAttribute            = "search-attribute"
	FlagSkipBaseIsNotCurrent       = "skip-base-is-not-current"
	FlagSkipCurrentOpen            = "skip-current-open"
	FlagStartTime                  = "start-time"
	FlagTaskQueue                  = "task-queue"
	FlagTaskQueueAlias             = []string{"t"}
	FlagTaskQueueType              = "task-queue-type"
	FlagTimeZone                   = "time-zone"
	FlagTLSCaPath                  = "tls-ca-path"
	FlagTLSCertPath                = "tls-cert-path"
	FlagTLSDisableHostVerification = "tls-disable-host-verification"
	FlagTLSKeyPath                 = "tls-key-path"
	FlagTLSServerName              = "tls-server-name"
	FlagType                       = "type"
	FlagUIIP                       = "ui-ip"
	FlagUIAssetPath                = "ui-asset-path"
	FlagUICodecEndpoint            = "ui-codec-endpoint"
	FlagUIPort                     = "ui-port"
	FlagUnpause                    = "unpause"
	FlagVisibilityArchivalState    = "visibility-archival-state"
	FlagVisibilityArchivalURI      = "visibility-uri"
	FlagWorkflowExecutionTimeout   = "execution-timeout"
	FlagWorkflowID                 = "workflow-id"
	FlagWorkflowIDAlias            = []string{"w"}
	FlagWorkflowIDReusePolicy      = "id-reuse-policy"
	FlagWorkflowRunTimeout         = "run-timeout"
	FlagWorkflowTaskTimeout        = "task-timeout"
	FlagWorkflowType               = "workflow-type"
	FlagYes                        = "yes"
	FlagYesAlias                   = []string{"y"}
)

Flags used to specify cli command line arguments

View Source
var FlagsForExecution = []cli.Flag{
	&cli.StringFlag{
		Name:     FlagWorkflowID,
		Aliases:  FlagWorkflowIDAlias,
		Usage:    FlagWorkflowId,
		Required: true,
		Category: CategoryMain,
	},
	&cli.StringFlag{
		Name:     FlagRunID,
		Aliases:  FlagRunIDAlias,
		Usage:    FlagRunIdDefinition,
		Category: CategoryMain,
	},
}
View Source
var FlagsForFormatting = []cli.Flag{
	&cli.StringFlag{
		Name:     output.FlagOutput,
		Aliases:  []string{"o"},
		Usage:    output.UsageText,
		Value:    string(output.Table),
		Category: CategoryDisplay,
	},
	&cli.StringFlag{
		Name:     format.FlagTimeFormat,
		Usage:    fmt.Sprintf("Format time as: %v, %v, %v.", format.Relative, format.ISO, format.Raw),
		Value:    string(format.Relative),
		Category: CategoryDisplay,
	},
	&cli.StringFlag{
		Name:     output.FlagFields,
		Usage:    FlagFieldsDefinition,
		Category: CategoryDisplay,
	},
}
View Source
var FlagsForPagination = []cli.Flag{
	&cli.IntFlag{
		Name:     output.FlagLimit,
		Usage:    FlagLimitDefinition,
		Category: CategoryDisplay,
	},
	&cli.StringFlag{
		Name:     pager.FlagPager,
		Usage:    FlagPagerDefinition,
		EnvVars:  []string{"PAGER"},
		Category: CategoryDisplay,
	},
	&cli.BoolFlag{
		Name:     pager.FlagNoPager,
		Aliases:  []string{"P"},
		Usage:    FlagNoPagerDefinition,
		Category: CategoryDisplay,
	},
}
View Source
var FlagsForPaginationAndRendering = append(FlagsForPagination, FlagsForFormatting...)
View Source
var FlagsForShowWorkflow = []cli.Flag{
	&cli.IntFlag{
		Name:     FlagMaxFieldLength,
		Usage:    FlagMaxFieldLengthDefinition,
		Value:    defaultMaxFieldLength,
		Category: CategoryMain,
	},
	&cli.BoolFlag{
		Name:     FlagResetPointsOnly,
		Usage:    FlagResetPointsOnlyDefinition,
		Category: CategoryMain,
	},
	&cli.BoolFlag{
		Name:     output.FlagFollow,
		Aliases:  FlagFollowAlias,
		Usage:    FlagFollowAliasDefinition,
		Value:    false,
		Category: CategoryMain,
	},
}
View Source
var FlagsForStartWorkflow = append(FlagsForStartWorkflowT,
	&cli.StringFlag{
		Name:     FlagType,
		Usage:    FlagWFTypeDefinition,
		Required: true,
		Category: CategoryMain,
	})
View Source
var FlagsForStartWorkflowLong = append(FlagsForStartWorkflowT,
	&cli.StringFlag{
		Name:     FlagWorkflowType,
		Usage:    FlagWFTypeDefinition,
		Required: true,
		Category: CategoryMain,
	})
View Source
var FlagsForStartWorkflowT = []cli.Flag{
	&cli.StringFlag{
		Name:     FlagWorkflowID,
		Aliases:  FlagWorkflowIDAlias,
		Usage:    FlagWorkflowId,
		Category: CategoryMain,
	},
	&cli.StringFlag{
		Name:     FlagTaskQueue,
		Aliases:  FlagTaskQueueAlias,
		Usage:    FlagTaskQueueDefinition,
		Required: true,
		Category: CategoryMain,
	},
	&cli.IntFlag{
		Name:     FlagWorkflowRunTimeout,
		Usage:    FlagWorkflowRunTimeoutDefinition,
		Category: CategoryMain,
	},
	&cli.IntFlag{
		Name:     FlagWorkflowExecutionTimeout,
		Usage:    FlagWorkflowExecutionTimeoutDefinition,
		Category: CategoryMain,
	},
	&cli.IntFlag{
		Name:     FlagWorkflowTaskTimeout,
		Value:    defaultWorkflowTaskTimeoutInSeconds,
		Usage:    FlagWorkflowTaskTimeoutDefinition,
		Category: CategoryMain,
	},
	&cli.StringFlag{
		Name:     FlagCronSchedule,
		Usage:    FlagCronScheduleDefinition,
		Category: CategoryMain,
	},
	&cli.StringFlag{
		Name:     FlagWorkflowIDReusePolicy,
		Usage:    FlagWorkflowIdReusePolicyDefinition,
		Category: CategoryMain,
	},
	&cli.StringSliceFlag{
		Name:     FlagInput,
		Aliases:  FlagInputAlias,
		Usage:    FlagInputDefinition,
		Category: CategoryMain,
	},
	&cli.StringFlag{
		Name:     FlagInputFile,
		Usage:    FlagInputFileDefinition,
		Category: CategoryMain,
	},
	&cli.IntFlag{
		Name:     FlagMaxFieldLength,
		Usage:    FlagMaxFieldLengthDefinition,
		Category: CategoryMain,
	},
	&cli.StringSliceFlag{
		Name:     FlagSearchAttribute,
		Usage:    FlagSearchAttributeDefinition,
		Category: CategoryMain,
	},
	&cli.StringSliceFlag{
		Name:     FlagMemo,
		Usage:    FlagMemoDefinition,
		Category: CategoryMain,
	},
	&cli.StringFlag{
		Name:     FlagMemoFile,
		Usage:    FlagMemoFileDefinition,
		Category: CategoryMain,
	},
}
View Source
var FlagsForWorkflowFiltering = []cli.Flag{
	&cli.StringFlag{
		Name:     FlagQuery,
		Aliases:  FlagQueryAlias,
		Usage:    FlagQueryUsage,
		Category: CategoryMain,
	},
	&cli.BoolFlag{
		Name:     FlagArchive,
		Usage:    FlagArchiveDefinition,
		Category: CategoryMain,
	},
}
View Source
var SharedFlags = []cli.Flag{
	&cli.StringFlag{
		Name:     FlagEnv,
		Value:    config.DefaultEnv,
		Usage:    FlagEnvDefinition,
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagAddress,
		Value:    "",
		Usage:    FlagAddrDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_ADDRESS"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagNamespace,
		Aliases:  FlagNamespaceAlias,
		Value:    "default",
		Usage:    FlagNSAliasDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_NAMESPACE"},
		Category: CategoryClient,
	},
	&cli.StringSliceFlag{
		Name:     FlagMetadata,
		Usage:    FlagMetadataDefinition,
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagTLSCertPath,
		Value:    "",
		Usage:    FlagTLSCertPathDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_TLS_CERT"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagTLSKeyPath,
		Value:    "",
		Usage:    FlagTLSKeyPathDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_TLS_KEY"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagTLSCaPath,
		Value:    "",
		Usage:    FlagTLSCaPathDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_TLS_CA"},
		Category: CategoryClient,
	},
	&cli.BoolFlag{
		Name:     FlagTLSDisableHostVerification,
		Usage:    FlagTLSDisableHVDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_TLS_DISABLE_HOST_VERIFICATION"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagTLSServerName,
		Value:    "",
		Usage:    FlagTLSServerNameDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_TLS_SERVER_NAME"},
		Category: CategoryClient,
	},
	&cli.IntFlag{
		Name:     FlagContextTimeout,
		Value:    defaultContextTimeoutInSeconds,
		Usage:    FlagContextTimeoutDefinition,
		EnvVars:  []string{"TEMPORAL_CONTEXT_TIMEOUT"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagCodecEndpoint,
		Value:    "",
		Usage:    FlagCodecEndpointDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_CODEC_ENDPOINT"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     FlagCodecAuth,
		Value:    "",
		Usage:    FlagCodecAuthDefinition,
		EnvVars:  []string{"TEMPORAL_CLI_CODEC_AUTH"},
		Category: CategoryClient,
	},
	&cli.StringFlag{
		Name:     color.FlagColor,
		Usage:    fmt.Sprintf("when to use color: %v, %v, %v.", color.Auto, color.Always, color.Never),
		Value:    string(color.Auto),
		Category: CategoryDisplay,
	},
}

Functions

func AddBeforeHandler

func AddBeforeHandler(cmd *cli.Command, h func(*cli.Context) error)

func AllowedEnumValues

func AllowedEnumValues(names map[int32]string) []string

func ColorEvent

func ColorEvent(e *historypb.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 EnsureNonNil

func EnsureNonNil[T any, P ~*T](ptr *P)

func FormatTime

func FormatTime(t time.Time, onlyTime bool) string

func GetCliIdentity

func GetCliIdentity() string

func GetCurrentUserFromEnv

func GetCurrentUserFromEnv() string

func NewContext

func NewContext(c *cli.Context) (context.Context, context.CancelFunc)

func NewContextForLongPoll

func NewContextForLongPoll(c *cli.Context) (context.Context, context.CancelFunc)

func NewContextWithCLIHeaders

func NewContextWithCLIHeaders() (context.Context, context.CancelFunc)

NewContextWithCLIHeaders creates context with version headers for CLI.

func NewContextWithTimeout

func NewContextWithTimeout(c *cli.Context, timeout time.Duration) (context.Context, context.CancelFunc)

func NewContextWithTimeoutAndCLIHeaders

func NewContextWithTimeoutAndCLIHeaders(timeout time.Duration) (context.Context, context.CancelFunc)

NewContextWithTimeoutAndCLIHeaders creates context with timeout and version headers for CLI.

func NewIndefiniteContext

func NewIndefiniteContext(c *cli.Context) (context.Context, context.CancelFunc)

func ParseTime

func ParseTime(timeStr string, defaultValue time.Time, now time.Time) (time.Time, error)

func PrettyPrintJSONObject

func PrettyPrintJSONObject(c *cli.Context, o interface{})

func ProcessJSONInput

func ProcessJSONInput(c *cli.Context) (*commonpb.Payloads, error)

process and validate input provided through cmd or file

func Prompt

func Prompt(msg string, autoConfirm bool, expectedInputs ...string) bool

Prompt user to confirm/deny action. Supports empty expectedInputs.

func PromptYes

func PromptYes(msg string, autoConfirm bool) bool

func RequiredFlag

func RequiredFlag(c *cli.Context, optionName string) (string, error)

func SplitKeyValuePairs

func SplitKeyValuePairs(kvs []string) (map[string]string, error)

SplitKeyValuePairs parses key=value pairs

func StringToEnum

func StringToEnum(search string, candidates map[string]int32) (int32, error)

func Truncate

func Truncate(str string) string

func UnmarshalInputsFromCLI

func UnmarshalInputsFromCLI(c *cli.Context) ([]interface{}, error)

func WithFlags

func WithFlags(commands []*cli.Command, newFlags []cli.Flag) []*cli.Command

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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