Documentation
¶
Index ¶
- Constants
- Variables
- func AddBeforeHandler(cmd *cli.Command, h func(*cli.Context) error)
- func AllowedEnumValues(names map[int32]string) []string
- func ColorEvent(e *historypb.HistoryEvent) string
- func EnsureNonNil[T any, P ~*T](ptr *P)
- func FormatTime(t time.Time, onlyTime bool) string
- func GetCliIdentity() string
- func GetCurrentUserFromEnv() string
- func NewContext(c *cli.Context) (context.Context, context.CancelFunc)
- func NewContextForLongPoll(c *cli.Context) (context.Context, context.CancelFunc)
- func NewContextWithCLIHeaders() (context.Context, context.CancelFunc)
- func NewContextWithTimeout(c *cli.Context, timeout time.Duration) (context.Context, context.CancelFunc)
- func NewContextWithTimeoutAndCLIHeaders(timeout time.Duration) (context.Context, context.CancelFunc)
- func NewIndefiniteContext(c *cli.Context) (context.Context, context.CancelFunc)
- func ParseTime(timeStr string, defaultValue time.Time, now time.Time) (time.Time, error)
- func PrettyPrintJSONObject(c *cli.Context, o interface{})
- func ProcessJSONInput(c *cli.Context) (*commonpb.Payloads, error)
- func Prompt(msg string, autoConfirm bool, expectedInputs ...string) bool
- func PromptYes(msg string, autoConfirm bool) bool
- func RequiredFlag(c *cli.Context, optionName string) (string, error)
- func SplitKeyValuePairs(kvs []string) (map[string]string, error)
- func StringToEnum(search string, candidates map[string]int32) (int32, error)
- func Truncate(str string) string
- func UnmarshalInputsFromCLI(c *cli.Context) ([]interface{}, error)
- func WithFlags(commands []*cli.Command, newFlags []cli.Flag) []*cli.Command
- type MemWriter
Constants ¶
View Source
const ( // Main command definitions WorkflowDefinition = "Start, list, and operate on Workflows" ActivityDefinition = "Complete or fail Activities" TaskQueueDefinition = "Manage Task Queues" ScheduleDefinition = "Create and edit Schedules" BatchDefinition = "List and terminate Batch jobs" OperatorDefinition = "Manage a running Server" EnvDefinition = "Manage Server connections" // 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." UpdateWorkflowDefinition = "Updates a running workflow synchronously." // Activity subcommand definitions CompleteActivityDefinition = "Completes an Activity Execution." FailActivityDefinition = "Fails an Activity Execution." // Task Queue subcommand definitions DescribeTaskQueueDefinition = "Provides information for Workers that have recently polled on this Task Queue." ListPartitionTaskQueueDefinition = "Lists the Task Queue's partitions and the matching nodes they are assigned to." UpdateBuildIDsDefinition = "Operations to update the sets of worker Build ID versions on the Task Queue" GetBuildIDsDefinition = "Fetch the sets of worker Build ID versions on the Task Queue" GetBuildIDReachabilityDefinition = "Retrieves information about the reachability of Build IDs on one or more Task Queues" // Batch subcommand definitions DescribeBatchJobDefinition = "Provide information about a Batch operation job." ListBatchJobsDefinition = "List all Batch operation jobs on the Temporal Client." TerminateBatchJobDefinition = "Stop an ongoing Batch operation job." NamespaceDefinition = "Operations performed on 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 ListEnvDefinition = "Print all environments." GetDefinition = "Print environment properties." SetDefinition = "Set environment properties." DeleteDefinition = "Delete an environment or environment 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." // Update build id subcommand definitions AddNewDefaultBuildIDDefinition = "Add a new default (incompatible) build ID to the Task Queue version sets." AddNewDefaultBuildIDDefinitionUsage = "" /* 191-byte string literal not displayed */ AddNewCompatibleBuildIDDefinition = "Add a new build ID compatible with an existing ID to the Task Queue version sets." AddNewCompatibleBuildIDDefinitionUsage = "The new build ID will become the default for the set containing the existing ID. See per-flag help for more." PromoteSetDefinition = "Promote an existing build ID set to become the default for the Task Queue." PromoteSetDefinitionUsage = "If the set is already the default, this command has no effect." PromoteIDInSetDefinition = "Promote an existing build ID to become the default for its containing set." PromoteIDInSetDefinitionUsage = "New tasks compatible with the the set will be dispatched to the default id." )
View Source
const ( // Shared flag definitions FlagEnvDefinition = "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 (formatted as key=value)." FlagTLSDefinition = "Enable TLS encryption without additional options such as mTLS or client certificates." FlagTLSCertPathDefinition = "Path to x509 certificate." FlagTLSKeyPathDefinition = "Path to private certificate key." FlagTLSCaPathDefinition = "Path to server CA certificate." FlagTLSDisableHVDefinition = "Disables TLS host-name verification." FlagTLSServerNameDefinition = "Overrides target TLS server name." FlagContextTimeoutDefinition = "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 Workflow Run." FlagWorkflowExecutionTimeoutDefinition = "Timeout (in seconds) for a WorkflowExecution, including retries and `ContinueAsNew` 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 = "" /* 159-byte string literal not displayed */ FlagInputDefinition = "" /* 149-byte string literal not displayed */ FlagInputFileDefinition = "" /* 285-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." FlagStartDelayDefinition = "" /* 194-byte string literal not displayed */ // Other Workflow flags FlagResetPointsUsage = "Only show auto-reset points." FlagPrintRawUsage = "Print properties without changing their format." QueryFlagTypeUsage = "The type of Query to run." FlagWorkflowSignalUsage = "Signal Workflow Execution by Id." FlagSignalName = "Signal Name" FlagInputSignal = "Input for the Signal. Formatted in JSON." FlagInputFileSignal = "Input for the Signal from file. Formatted in JSON." FlagUpdateHandlerName = "Update handler Name" FlagUpdateHandlerInput = "Args for the Update handler. Formatted in JSON." FlagUpdateIDDefinition = "UpdateID to check the result of an update (either UpdateID or Update handler name should be passed)" FlagCancelWorkflow = "Cancel Workflow Execution with given Workflow Id." FlagWorkflowIDTerminate = "Terminate Workflow Execution with given Workflow Id." FlagQueryCancel = "Cancel Workflow Executions with given List Filter." FlagQueryDelete = "Delete Workflow Executions with given List Filter." FlagQuerySignal = "Signal Workflow Executions with given List List Filter." FlagQueryTerminate = "Terminate Workflow Executions with given 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 a reset." 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 per 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 Workflow Run." FlagNonDeterministicDefinition = "Reset Workflow Execution if its last Event is `WorkflowTaskFailed` with a nondeterministic error." FlagDryRunDefinition = "Simulate reset without resetting any Workflow Executions." FlagDepthDefinition = "Depth of child workflows to fetch. Use -1 to fetch child workflows at any depth." 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 are less, more, and favoritePager." FlagNoPagerDefinition = "Disables the interactive pager." FlagFieldsDefinition = "Customize fields to print. Set to 'long' to automatically print more information for 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 = "Reason to fail the Activity." FlagReasonDefinition = "Reason to perform an 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 are Skip, BufferOne, BufferAll, CancelOther, TerminateOther and 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 (formatted as key=value). Use valid JSON formats for value." FlagMemoScheduleDefinition = "Set a memo on a schedule (formatted as 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 in JSON format. Recommended to use this over -o json for scripting." // Search Attribute flags FlagNameSearchAttribute = "Search Attribute name." FlagYesDefinition = "Confirm all prompts." // Task Queue flags FlagTaskQueueName = "Name of the Task Queue." FlagTaskQueueTypeDefinition = "Task Queue type [workflow|activity]" FlagPartitionsDefinition = "Query for all partitions up to this number (experimental+temporary feature)" // Namespace update flags FlagActiveClusterDefinition = "Active cluster name." FlagClusterDefinition = "Cluster name." FlagDescriptionDefinition = "Namespace description." FlagHistoryArchivalStateDefinition = "History archival state, valid values are \"disabled\" and \"enabled\"" FlagHistoryArchivalURIDefinition = "Optionally specify history archival URI (cannot be changed after first time archival is enabled)" FlagIsGlobalNamespaceDefinition = "Whether the namespace is a global namespace." FlagNamespaceDataDefinition = "Namespace data in key=value format. Use JSON for values." FlagNamespaceVerboseDefinition = "Print applied namespace changes" FlagOwnerDefinition = "Owner email." FlagPromoteNamespaceDefinition = "Promote local namespace to global namespace" FlagRetentionDefinition = "Length of time (in days) a closed Workflow is preserved before deletion." FlagVisibilityArchivalStateDefinition = "Visibility archival state, valid values are \"disabled\" and \"enabled\"" FlagVisibilityArchivalURIDefinition = "Optionally specify visibility archival URI (cannot be changed after first time archival is enabled)" // Build id based versioning flags FlagNewBuildIDUsage = "The new build id to be added." FlagExistingCompatibleBuildIDUsage = "" /* 188-byte string literal not displayed */ FlagSetBuildIDAsDefaultUsage = "" /* 190-byte string literal not displayed */ FlagPromoteSetBuildIDUsage = "An existing build id whose containing set will be promoted." FlagPromoteBuildIDUsage = "An existing build id which will be promoted to be the default inside its containing set." FlagMaxBuildIDSetsUsage = "" /* 133-byte string literal not displayed */ FlagBuildIDReachabilityUsage = "Which Build ID to get reachability information for. May be specified multiple times." FlagTaskQueueForReachabilityUsage = "Which Task Queue(s) to constrain the reachability search to. May be specified multiple times." FlagReachabilityTypeUsage = "" /* 292-byte string literal not displayed */ )
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).
Activity commands follow this syntax:
` + "`" + `temporal activity [command] [command options]` + "`" + `
`
View Source
const BatchUsageText = `` /* 890-byte string literal not displayed */
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 Task](/concepts/what-is-a-command) will be scheduled, and the Workflow Execution performs cleanup work.
` + "`" + `temporal workflow cancel --workflow-id=meaningful-business-id` + "`" + `
In addition to Workflow IDs, Workflows can also be [Signaled](/concepts/what-is-a-signal) by a [Query](/concepts/what-is-a-query).
` + "`" + `temporal workflow cancel --query=MyQuery` + "`" + `
Use the options listed below to change the behavior of this command.`
View Source
const ClusterDescribeUsageText = `The ` + "`" + `temporal operator cluster describe` + "`" + ` command shows information about the [Cluster](/concepts/what-is-a-temporal-cluster).
This information can include information about other connected services, such as a remote [Codec Server](/concepts/what-is-a-codec-server).
Use the options listed below to change the output of this command.`
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.
` + "`" + `temporal operator cluster list` + "`" + `
Use the options listed below to change the command's behavior.`
View Source
const ClusterRemoveUsageText = `The ` + "`" + `temporal operator cluster remove` + "`" + ` command removes a remote [Cluster](/concepts/what-is-a-temporal-cluster) from the system.
` + "`" + `temporal operator cluster remove --name=SomeCluster` + "`" + `
Use the options listed below to change the command's behavior.`
View Source
const ClusterSystemUsageText = `The ` + "`" + `temporal operator cluster system` + "`" + ` command provides information about the system the [Cluster](/concepts/what-is-a-temporal-cluster) is running on.
This information can be used to diagnose problems occurring in the [Temporal Server](/concepts/what-is-the-temporal-server).
` + "`" + `temporal operator cluster system` + "`" + `
Use the options listed below to change this command's output.`
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).
` + "`" + `temporal operator cluster upsert --frontend-address="127.0.2.1"` + "`" + `
Upserting can also be used to enable or disabled cross-cluster connection.
` + "`" + `temporal operator cluster upsert --enable-connection=true` + "`" + `
Use the options listed below to change the behavior of this command.`
View Source
const ClusterUsageText = `Cluster commands enable operations on [Temporal Clusters](/concepts/what-is-a-temporal-cluster).
Cluster commands follow this syntax:
` + "`" + `temporal operator cluster COMMAND [ARGS]` + "`" + ``
View Source
const CompleteActivityUsageText = `The ` + "`" + `temporal activity complete` + "`" + ` command completes an [Activity Execution](/concepts/what-is-an-activity-execution).
The result given upon return can also be set with the command.
` + "`" + `temporal activity complete --activity-id=MyActivity --result=ActivityComplete` + "`" + `
Use the options listed below to change the behavior of this command.`
View Source
const CustomTemplateHelpCLI = `` /* 457-byte string literal not displayed */
View Source
const DescribeBatchUsageText = `The ` + "`" + `temporal batch describe` + "`" + ` command shows the progress of an ongoing Batch job.
Pass a valid Job ID to return a Batch Job's information.
` + "`" + `temporal batch describe --job-id=MyJobId` + "`" + `
Use the command options below to change the information returned by this command.`
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.
A ` + "`" + `LastAccessTime` + "`" + ` value in excess of one minute can indicate 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.
Information about the Task Queue can be returned to troubleshoot server issues.
` + "`" + `temporal task-queue describe --task-queue=MyTaskQueue --task-queue-type="activity"` + "`" + `
Use the options listed below to modify what this command returns.`
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.
` + "`" + `temporal workflow describe --workflow-id=meaningful-business-id` + "`" + `
Output can be shown as printed ('raw') or formatted to only show the Workflow Execution's auto-reset points.
` + "`" + `temporal workflow describe --workflow-id=meaningful-business-id --raw=true --reset-points=true` + "`" + `
Use the command options below to change the information returned by this command.`
View Source
const EnvDeleteUsageText = "`" + `temporal env delete [environment or property]` + "`" + `
Delete an environment or just a single property:
` + "`" + `temporal env delete prod` + "`" + `
` + "`" + `temporal env delete prod.tls-cert-path` + "`"
View Source
const EnvGetUsageText = "`" + `temporal env get [environment or property]` + "`" + `
Print all properties of the 'prod' environment:
` + "`" + `temporal env get prod` + "`" + `
tls-cert-path /home/my-user/certs/client.cert
tls-key-path /home/my-user/certs/client.key
address temporal.example.com:7233
namespace someNamespace
Print a single property:
` + "`" + `temporal env get prod.tls-key-path` + "`" + `
tls-key-path /home/my-user/certs/cluster.key`
View Source
const EnvListUsageText = `List all environments`
View Source
const EnvSetUsageText = "`" + `temporal env set [environment.property name] [property value]` + "`" + `
Property names match CLI option names, for example '--address' and '--tls-cert-path':
` + "`" + `temporal env set prod.address 127.0.0.1:7233` + "`" + `
` + "`" + `temporal env set prod.tls-cert-path /home/my-user/certs/cluster.cert` + "`"
View Source
const EnvUsageText = `` /* 170-byte string literal not displayed */
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 completes when the Workflow Execution completes.
Single quotes('') are used to wrap input as JSON.
` + "`" + `` + "`" + `` + "`" + `
temporal workflow execute
--workflow-id meaningful-business-id \
--type MyWorkflow \
--task-queue MyTaskQueue \
--input '{"Input": "As-JSON"}'
` + "`" + `` + "`" + `` + "`" + `
Use the command options below to change the information returned by this command.`
View Source
const FailActivityUsageText = `The ` + "`" + `temporal activity fail` + "`" + ` command fails an [Activity Execution](/concepts/what-is-an-activity-execution).
The Activity must be running on a valid [Workflow](/concepts/what-is-a-workflow).
` + "`" + `temporal fail --workflow-id=meaningful-business-id --activity-id=MyActivity` + "`" + `
Use the options listed below to change the behavior of this command.`
View Source
const GetBuildIDReachabilityDefinitionText = "This command can tell you whether or not Build IDs may be used for for new, existing, or closed workflows. " +
"Both the --build-id and --task-queue flags may be specified multiple times. " +
"If you do not provide a task queue, reachability for the provided Build IDs will be checked against all task queues."
View Source
const GetBuildIDsDefinitionText = "Fetch the sets of compatible build IDs associated with a Task Queue and associated information."
View Source
const HealthUsageText = `The ` + "`" + `temporal operator cluster health` + "`" + ` command checks the health of the [Frontend Service](/concepts/what-is-a-frontend-service).
A successful execution returns a list of [Cluster](/concepts/what-is-a-temporal-cluster) metrics.
Use the options listed below to change the behavior and output of this command.`
View Source
const ListBatchUsageText = `The ` + "`" + `temporal batch list` + "`" + ` command returns all Batch jobs.
Batch Jobs can be returned for an entire Cluster or a single Namespace.
` + "`" + `temporal batch list --namespace=MyNamespace` + "`" + `
Use the command options below to change the information returned by this command.`
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 up to 10 closed Workflow Executions.
` + "`" + `temporal workflow list --query=MyQuery` + "`" + `
The command can also return a list of archived Workflow Executions.
` + "`" + `temporal workflow list --archived=true` + "`" + `
Use the command options below to change the information returned by this command.`
View Source
const NamespaceCreateUsageText = `The ` + "`" + `temporal operator namespace create` + "`" + ` command creates a new [Namespace](/concepts/what-is-a-namespace) on the [Server](/concepts/what-is-a-frontend-service).
Namespaces can be created on the active [Cluster](/concepts/what-is-a-temporal-cluster), or any named Cluster.
` + "`" + `temporal operator namespace --cluster=MyCluster example-1` + "`" + `
Global Namespaces can also be created.
` + "`" + `temporal operator namespace create --global example-2` + "`" + `
Other settings, such as [retention](/concepts/what-is-a-retention-period) and [Visibility Archival State](/concepts/what-is-visibility), can be configured as needed.
For example, the Visibility Archive can be set on a separate URI.
` + "`" + `temporal operator namespace create --retention=RetentionMyWorkflow --visibility-archival-state="enabled" --visibility-uri="some-uri" example-3` + "`" + `
Use the options listed below to change the command's behavior.`
View Source
const NamespaceDeleteUsageText = `The ` + "`" + `temporal operator namespace delete` + "`" + ` command deletes a given [Namespace](/concepts/what-is-a-namespace) from the system.
Its syntax is:
` + "`" + `temporal operator namespace delete [ARGS]` + "`" + `
Use the command options below to change the information returned by this command.`
View Source
const NamespaceDescribeUsageText = `The ` + "`" + `temporal operator namespace describe` + "`" + ` command provides [Namespace](/concepts/what-is-a-namespace) information.
Namespaces are identified by Namespace ID.
` + "`" + `temporal operator namespace describe --namespace-id=meaningful-business-id` + "`" + `
Use the options listed below to change the command's output.`
View Source
const NamespaceListUsageText = `The ` + "`" + `temporal operator namespace list` + "`" + ` command lists all [Namespaces](/namespaces) on the [Server](/concepts/what-is-a-frontend-service).
` + "`" + `temporal operator namespace list` + "`" + `
Use the options listed below to change the command's output.`
View Source
const NamespaceUpdateUsageText = `The ` + "`" + `temporal operator namespace update` + "`" + ` command updates a [Namespace](/concepts/what-is-a-namespace).
Namespaces can be assigned a different active [Cluster](/concepts/what-is-a-temporal-cluster).
` + "`" + `temporal operator namespace update --active-cluster=NewActiveCluster` + "`" + `
Namespaces can also be promoted to global Namespaces.
` + "`" + `temporal operator namespace --promote-global=true` + "`" + `
Any [Archives](/concepts/what-is-archival) that were previously enabled or disabled can be changed through this command.
However, URI values for archival states cannot be changed after the states are enabled.
` + "`" + `temporal operator namespace update --history-archival-state="enabled" --visibility-archival-state="disabled"` + "`" + `
Use the options listed below to change the command's behavior.`
View Source
const NamespaceUsageText = `Namespace commands perform operations on [Namespaces](/concepts/what-is-a-namespace) contained in the [Temporal Cluster](/concepts/what-is-a-temporal-cluster).
Namespace commands follow this syntax:
` + "`" + `temporal operator namespace COMMAND [ARGS]` + "`" + `
`
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.
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).
` + "`" + `temporal workflow query --workflow-id=meaningful-business-id --type=MyQueryType` + "`" + `
Use the command options listed below to change the information returned by this command.`
View Source
const ResetBatchUsageText = `The ` + "`" + `temporal workflow reset-batch` + "`" + ` command resets multiple [Workflow Executions](/concepts/what-is-a-workflow-execution) by ` + "`" + `resetType` + "`" + `.
Resetting a [Workflow](/concepts/what-is-a-workflow) resumes it from a certain point without losing its parameters or [Event History](/concepts/what-is-an-event-history).
The set of Workflow Executions to reset can be specified in an input file.
The input file must have a [Workflow ID](/concepts/what-is-a-workflow-id) on each line.
` + "`" + `temporal workflow reset-batch --input-file=MyInput --input-separator="\t"` + "`" + `
Workflow Executions can also be found by [Query](/concepts/what-is-a-query).
` + "`" + `temporal workflow reset-batch --query=MyQuery
Use the options listed below to change reset behavior.`
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 resume from a certain point without losing its parameters or [Event History](/concepts/what-is-an-event-history).
The Workflow Execution can be set to a given [Event Type](/concepts/what-is-an-event).
` + "`" + `temporal workflow reset --workflow-id=meaningful-business-id --type=LastContinuedAsNew` + "`" + `
The Workflow Execution can also be reset to any Event after []` + "`" + `WorkflowTaskStarted` + "`" + `](/references/events#workflowtaskstarted).
` + "`" + `temporal workflow reset --workflow-id=meaningful-business-id --event-id=MyLastEvent` + "`" + `
Use the options listed below to change reset behavior.`
View Source
const ScheduleBackfillUsageText = `The ` + "`" + `temporal schedule backfill` + "`" + ` command executes Actions ahead of their specified time range.
Backfilling can 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.
Schedule backfills require a valid Schedule ID, along with the time in which to run the Schedule and a change to the overlap policy.
` + "`" + `` + "`" + `` + "`" + `
temporal schedule backfill --schedule-id '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 are passed in the following format:
` + "`" + `` + "`" + `` + "`" + `
temporal schedule create \
--schedule-id MyScheduleId \
--cron '3 11 * * Fri' \
--workflow-id MyWorkflowId \
--task-queue MyTaskQueue \
--workflow-type MyWorkflowType \
--input '{"Input": "As-JSON"}'
` + "`" + `` + "`" + `` + "`" + `
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.
In additon, 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 --schedule-id '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 --schedule-id '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` + "`" + `
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.
Use ` + "`" + `--reason` + "`" + ` to note the issue leading to the pause or unpause.
Schedule toggles follow this syntax:
` + "`" + ` temporal schedule toggle --schedule-id 'your-schedule-id' --pause --reason "paused because the database is down"` + "`" + `
` + "`" + `temporal schedule toggle --schedule-id 'your-schedule-id' --unpause --reason "the database is back up"` + "`" + `
Use the command options below to change the information returned by this command.`
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.
Schedule triggers follow this syntax:
` + "`" + `temporal schedule trigger` + "`" + ` can be used to start a Workflow Run immediately.
` + "`" + `temporal schedule trigger --schedule-id 'your-schedule-id'` + "`" + `
The Overlap Policy of the Schedule can be overridden as well.
` + "`" + `temporal schedule trigger --schedule-id '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).
Updated Schedules need to follow a certain format:
` + "`" + `` + "`" + `` + "`" + `
temporal schedule update \
--schedule-id MyScheduleId \
--cron '3 11 * * Fri' \
--workflow-id MyWorkflowId \
--task-queue MyTaskQueue \
--workflow-type MyWorkflowType
` + "`" + `` + "`" + `` + "`" + `
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 command options below to change the information returned by this command.`
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](/concepts/what-is-a-workflow-execution) are performed, making it a useful tool for automation.
Schedule commands follow this syntax:
` + "`" + `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) to a [Workflow Execution](/concepts/what-is-a-workflow-execution).
These Search Attributes can be used to [filter a list](/concepts/what-is-a-list-filter) of Workflow Executions that contain the given Search Attributes in their metadata.
Use the options listed below to change the command's behavior.`
View Source
const SearchAttributeListUsageText = `The ` + "`" + `temporal operator search-attribute list` + "`" + ` command displays a list of all [Search Attributes](/concepts/what-is-a-search-attribute) for a [Workflow Execution](/concepts/what-is-a-workflow-execution).
Attributes on this list can be used in [Queries](/concepts/what-is-a-query).
` + "`" + ` temporal workflow list --query` + "`" + `.
Use the options listed below to change the command's behavior.`
View Source
const SearchAttributeRemoveUsageText = `The ` + "`" + `temporal operator search-attribute remove` + "`" + ` command removes custom [Search Attribute](/concepts/what-is-a-search-attribute) metadata from a [Workflow Execution](/concepts/what-is-a-workflow-execution).
This command does not remove custom Search Attributes from Elasticsearch or change the index schema.
Use the options listed below to change the command's behavior.`
View Source
const SearchAttributeUsageText = `Search Attribute commands enable operations for the creation, listing, and removal of [Search Attributes](/concepts/what-is-a-search-attribute) for [Workflow Executions](/concepts/what-is-a-workflow-execution).
Search Attribute commands follow this syntax:
` + "`" + `temporal operator search-attribute COMMAND [ARGS]` + "`" + `
`
View Source
const ServerUsageText = `Start a development version of [Temporal Server](/concepts/what-is-the-temporal-server):
` + "`" + `temporal server start-dev` + "`" + `
`
View Source
const StartDevUsageText = `Start [Temporal Server](/concepts/what-is-the-temporal-server) on ` + "`" + `localhost:7233` + "`" + ` with:
` + "`" + `temporal server start-dev` + "`" + `
View the UI at http://localhost:8233
To persist Workflows across runs, use:
` + "`" + `temporal server start-dev --db-filename temporal.db` + "`"
View Source
const StartWorkflowUsageText = `The ` + "`" + `temporal workflow start` + "`" + ` command starts a new [Workflow Execution](/concepts/what-is-a-workflow-execution).
The Workflow and Run IDs are returned after starting the [Workflow](/concepts/what-is-a-workflow).
` + "`" + `` + "`" + `` + "`" + `
temporal workflow start \
--workflow-id meaningful-business-id \
--type MyWorkflow \
--task-queue MyTaskQueue \
--input '{"Input": "As-JSON"}'
` + "`" + `` + "`" + `` + "`" + `
Use the command options below to change the information returned by this command.`
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.`
View Source
const TaskQueueUsageText = `Task Queue commands allow operations to be performed on [Task Queues](/concepts/what-is-a-task-queue).
To run a Task Queue command, run ` + "`" + `temporal task-queue [command] [command options]` + "`" + `
`
View Source
const TerminateBatchUsageText = `The ` + "`" + `temporal batch terminate` + "`" + ` command terminates a Batch job with the provided Job ID.
For future reference, provide a reason for terminating the Batch Job.
` + "`" + `temporal batch terminate --job-id=MyJobId --reason=JobReason` + "`" + `
Use the command options below to change the information returned by this command.`
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.
Workflow terminations require a valid [Workflow ID](/concepts/what-is-a-workflow-id) to function.
` + "`" + `temporal workflow terminate --workflow-id=meaningful-business-id` + "`" + `
Use the options listed below to change termination behavior.`
View Source
const UpdateBuildIDsDefinitionText = "" /* 154-byte string literal not displayed */
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.`
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.`
View Source
const WorkflowShowUsageText = `The ` + "`" + `temporal workflow show` + "`" + ` command provides the [Event History](/concepts/what-is-an-event-history) for a [Workflow Execution](/concepts/what-is-a-workflow-execution).
Use the options listed below to change the command's behavior.`
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](/concepts/what-is-a-workflow-id) or [List Filter](/concepts/what-is-a-list-filter).
` + "`" + `` + "`" + `` + "`" + `
temporal workflow signal \
--workflow-id MyWorkflowId \
--name MySignal \
--input '{"Input": "As-JSON"}'
` + "`" + `` + "`" + `` + "`" + `
Use the options listed below to change the command's behavior.`
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.`
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.`
View Source
const WorkflowUpdateUsageText = `The ` + "`" + `temporal workflow update` + "`" + ` command synchronously updates a running [Workflow Execution](/concepts/what-is-a-workflow-execution).
Use the options listed below to change the command's behavior.`
View Source
const WorkflowUsageText = `[Workflow](/concepts/what-is-a-workflow) commands perform operations on on [Workflow Executions](/concepts/what-is-a-workflow-execution).
Workflow commands use this syntax:
` + "`" + `temporal workflow COMMAND [ARGS]` + "`" + `
`
Variables ¶
View Source
var ( CategoryGlobal = "Shared Options:" CategoryDisplay = "Display Options:" CategoryMain = "Command 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" 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" FlagHTTPPort = "http-port" 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" FlagPartitions = "partitions" 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" FlagStartDelay = "start-delay" FlagTaskQueue = "task-queue" FlagTaskQueueAlias = []string{"t"} FlagTaskQueueType = "task-queue-type" FlagTimeZone = "time-zone" FlagTLS = "tls" FlagTLSCaPath = "tls-ca-path" FlagTLSCertPath = "tls-cert-path" FlagTLSDisableHostVerification = "tls-disable-host-verification" FlagTLSKeyPath = "tls-key-path" FlagTLSServerName = "tls-server-name" FlagType = "type" FlagUIAssetPath = "ui-asset-path" FlagUICodecEndpoint = "ui-codec-endpoint" FlagUIIP = "ui-ip" FlagUIPort = "ui-port" FlagUnpause = "unpause" FlagUpdateFirstExecutionRunID = "first-execution-run-id" FlagUpdateID = "update-id" FlagUpdateWaitPolicy = "wait-policy" FlagVerbose = "verbose" FlagVerboseAlias = []string{"v"} 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"} FlagBuildID = "build-id" FlagExistingCompatibleBuildID = "existing-compatible-build-id" FlagSetBuildIDAsDefault = "set-as-default" FlagMaxBuildIDSets = "max-sets" FlagReachabilityType = "reachability-type" )
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 FlagsForStackTraceQuery = append(FlagsForExecution, []cli.Flag{ &cli.StringFlag{ Name: FlagInput, Aliases: FlagInputAlias, Usage: FlagInputDefinition, Category: CategoryMain, }, &cli.StringSliceFlag{ Name: FlagInputFile, Usage: FlagInputFileDefinition, Category: CategoryMain, }, &cli.StringFlag{ Name: FlagQueryRejectCondition, Usage: FlagQueryRejectConditionDefinition, 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.StringSliceFlag{ 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, }, &cli.StringFlag{ Name: FlagStartDelay, Usage: FlagStartDelayDefinition, 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
FlagEnv, Value: config.DefaultEnv, Usage: FlagEnvDefinition, EnvVars: []string{"TEMPORAL_ENV"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagAddress, Value: "", Usage: FlagAddrDefinition, EnvVars: []string{"TEMPORAL_ADDRESS"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagNamespace, Aliases: FlagNamespaceAlias, Value: "default", Usage: FlagNSAliasDefinition, EnvVars: []string{"TEMPORAL_NAMESPACE"}, Category: CategoryGlobal, }, &cli.StringSliceFlag{ Name: FlagMetadata, Usage: FlagMetadataDefinition, Category: CategoryGlobal, }, &cli.BoolFlag{ Name: FlagTLS, Usage: FlagTLSDefinition, EnvVars: []string{"TEMPORAL_TLS"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagTLSCertPath, Value: "", Usage: FlagTLSCertPathDefinition, EnvVars: []string{"TEMPORAL_TLS_CERT"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagTLSKeyPath, Value: "", Usage: FlagTLSKeyPathDefinition, EnvVars: []string{"TEMPORAL_TLS_KEY"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagTLSCaPath, Value: "", Usage: FlagTLSCaPathDefinition, EnvVars: []string{"TEMPORAL_TLS_CA"}, Category: CategoryGlobal, }, &cli.BoolFlag{ Name: FlagTLSDisableHostVerification, Usage: FlagTLSDisableHVDefinition, EnvVars: []string{"TEMPORAL_TLS_DISABLE_HOST_VERIFICATION"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagTLSServerName, Value: "", Usage: FlagTLSServerNameDefinition, EnvVars: []string{"TEMPORAL_TLS_SERVER_NAME"}, Category: CategoryGlobal, }, &cli.IntFlag{ Name: FlagContextTimeout, Value: defaultContextTimeoutInSeconds, Usage: FlagContextTimeoutDefinition, EnvVars: []string{"TEMPORAL_CONTEXT_TIMEOUT"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagCodecEndpoint, Value: "", Usage: FlagCodecEndpointDefinition, EnvVars: []string{"TEMPORAL_CODEC_ENDPOINT"}, Category: CategoryGlobal, }, &cli.StringFlag{ Name: FlagCodecAuth, Value: "", Usage: FlagCodecAuthDefinition, EnvVars: []string{"TEMPORAL_CODEC_AUTH"}, Category: CategoryGlobal, }, &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, }, }&cli.StringFlag{ Name:
Functions ¶
func AddBeforeHandler ¶
func AddBeforeHandler(cmd *cli.Command, h func(*cli.Context) error)
func AllowedEnumValues ¶
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 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 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 PrettyPrintJSONObject ¶
func PrettyPrintJSONObject(c *cli.Context, o interface{})
func ProcessJSONInput ¶
process and validate input provided through cmd or file
func RequiredFlag ¶
func SplitKeyValuePairs ¶
SplitKeyValuePairs parses key=value pairs
func UnmarshalInputsFromCLI ¶
func UnmarshalInputsFromCLI(c *cli.Context) ([]interface{}, error)
Types ¶
type MemWriter ¶ added in v0.10.0
type MemWriter struct {
// contains filtered or unexported fields
}
MemWriter is an io.Writer implementation that stores the written content.
func (*MemWriter) GetContent ¶ added in v0.10.0
Click to show internal directories.
Click to hide internal directories.