cli

package
v1.14.0-alpha Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2021 License: MIT Imports: 83 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	FlagUsername                      = "username"
	FlagPassword                      = "password"
	FlagKeyspace                      = "keyspace"
	FlagAddress                       = "address"
	FlagHistoryAddress                = "history-address"
	FlagDBEngine                      = "db-engine"
	FlagDBAddress                     = "db-address"
	FlagDBPort                        = "db-port"
	FlagNamespaceID                   = "namespace-id"
	FlagNamespace                     = "namespace"
	FlagNamespaceAlias                = []string{"n"}
	FlagShardID                       = "shard-id"
	FlagWorkflowID                    = "workflow-id"
	FlagWorkflowIDAlias               = []string{"wid"}
	FlagRunID                         = "run-id"
	FlagRunIDAlias                    = []string{"rid"}
	FlagTreeID                        = "tree-id"
	FlagBranchID                      = "branch-id"
	FlagNumberOfShards                = "number-of-shards"
	FlagTargetCluster                 = "target-cluster"
	FlagMinEventID                    = "min-event-id"
	FlagMaxEventID                    = "max-event-id"
	FlagStartEventVersion             = "start-event-version"
	FlagTaskQueue                     = "task-queue"
	FlagTaskQueueAlias                = []string{"tq"}
	FlagTaskQueueType                 = "task-queue-type"
	FlagTaskQueueTypeAlias            = []string{"tqt"}
	FlagWorkflowIDReusePolicy         = "workflow-id-reuse-policy"
	FlagCronSchedule                  = "cron"
	FlagWorkflowType                  = "type"
	FlagWorkflowTypeAlias             = []string{"t"}
	FlagWorkflowStatus                = "status"
	FlagWorkflowExecutionTimeout      = "execution-timeout"
	FlagWorkflowExecutionTimeoutAlias = []string{"et"}
	FlagWorkflowRunTimeout            = "run-timeout"
	FlagWorkflowRunTimeoutAlias       = []string{"rt"}
	FlagWorkflowTaskTimeout           = "task-timeout"
	FlagWorkflowTaskTimeoutAlias      = []string{"tt"}
	FlagContextTimeout                = "context-timeout"
	FlagContextTimeoutAlias           = []string{"ct"}
	FlagInput                         = "input"
	FlagInputAlias                    = []string{"i"}
	FlagInputFile                     = "input-file"
	FlagInputFileAlias                = []string{"if"}
	FlagExcludeFile                   = "exclude-file"
	FlagInputSeparator                = "input-separator"
	FlagParallelism                   = "input-parallelism"
	FlagSkipCurrentOpen               = "skip-current-open"
	FlagSkipBaseIsNotCurrent          = "skip-base-is-not-current"
	FlagDryRun                        = "dry-run"
	FlagNonDeterministic              = "non-deterministic"
	FlagHostFile                      = "host-file"
	FlagCluster                       = "cluster"
	FlagInputCluster                  = "input-cluster"
	FlagTopic                         = "topic"
	FlagGroup                         = "group"
	FlagResult                        = "result"
	FlagIdentity                      = "identity"
	FlagDetail                        = "detail"
	FlagReason                        = "reason"
	FlagReasonAlias                   = []string{"r"}
	FlagOpen                          = "open"
	FlagPageSize                      = "pagesize"
	FlagPageSizeAlias                 = []string{"ps"}
	FlagFrom                          = "from"
	FlagTo                            = "to"
	FlagPrintEventVersion             = "print-event-version"
	FlagPrintEventVersionAlias        = []string{"pev"}
	FlagPrintFullyDetail              = "print-full"
	FlagPrintFullyDetailAlias         = []string{"pf"}
	FlagPrintRawTime                  = "print-raw-time"
	FlagPrintRawTimeAlias             = []string{"prt"}
	FlagPrintRaw                      = "print-raw"
	FlagPrintRawAlias                 = []string{"praw"}
	FlagPrintDateTime                 = "print-datetime"
	FlagPrintDateTimeAlias            = []string{"pdt"}
	FlagPrintMemo                     = "print-memo"
	FlagPrintMemoAlias                = []string{"pme"}
	FlagPrintSearchAttr               = "print-search-attr"
	FlagPrintSearchAttrAlias          = []string{"psa"}
	FlagPrintJSON                     = "print-json"
	FlagPrintJSONAlias                = []string{"pjson"}
	FlagDescription                   = "description"
	FlagDescriptionAlias              = []string{"desc"}
	FlagOwnerEmail                    = "owner-email"
	FlagOwnerEmailAlias               = []string{"oe"}
	FlagRetention                     = "retention"
	FlagRetentionAlias                = []string{"rd"}
	FlagHistoryArchivalState          = "history-archival-state"
	FlagHistoryArchivalStateAlias     = []string{"has"}
	FlagHistoryArchivalURI            = "history-uri"
	FlagHistoryArchivalURIAlias       = []string{"huri"}
	FlagHeartbeatedWithin             = "heartbeated-within"
	FlagVisibilityArchivalState       = "visibility-archival-state"
	FlagVisibilityArchivalStateAlias  = []string{"vas"}
	FlagVisibilityArchivalURI         = "visibility-uri"
	FlagVisibilityArchivalURIAlias    = []string{"vuri"}
	FlagName                          = "name"
	FlagNameAlias                     = []string{"n"}
	FlagOutputFilename                = "output-filename"
	FlagOutputFilenameAlias           = []string{"of"}
	FlagOutputFormat                  = "output"
	FlagQueryType                     = "query-type"
	FlagQueryTypeAlias                = []string{"qt"}
	FlagQueryRejectCondition          = "query-reject-condition"
	FlagQueryRejectConditionAlias     = []string{"qrc"}
	FlagShowDetail                    = "show-detail"
	FlagShowDetailAlias               = []string{"sd"}
	FlagActiveClusterName             = "active-cluster"
	FlagActiveClusterNameAlias        = []string{"ac"}
	FlagClusters                      = "clusters"
	FlagClustersAlias                 = []string{"cl"}
	FlagClusterMembershipRole         = "role"
	FlagIsGlobalNamespace             = "global-namespace"
	FlagIsGlobalNamespaceAlias        = []string{"gd"}
	FlagNamespaceData                 = "namespace-data"
	FlagNamespaceDataAlias            = []string{"dmd"}
	FlagEventID                       = "event-id"
	FlagEventIDAlias                  = []string{"eid"}
	FlagActivityID                    = "activity-id"
	FlagActivityIDAlias               = []string{"aid"}
	FlagMaxFieldLength                = "max-field-length"
	FlagMaxFieldLengthAlias           = []string{"maxl"}
	FlagSecurityToken                 = "security-token"
	FlagSecurityTokenAlias            = []string{"st"}
	FlagSkipErrorMode                 = "skip-errors"
	FlagSkipErrorModeAlias            = []string{"serr"}
	FlagHeadersMode                   = "headers"
	FlagHeadersModeAlias              = []string{"he"}
	FlagMessageType                   = "message-type"
	FlagMessageTypeAlias              = []string{"mt"}
	FlagURL                           = "url"
	FlagIndex                         = "index"
	FlagBatchSize                     = "batch-size"
	FlagBatchSizeAlias                = []string{"bs"}
	FlagMemoKey                       = "memo-key"
	FlagMemo                          = "memo"
	FlagMemoFile                      = "memo-file"
	FlagSearchAttributeKey            = "search-attribute-key"
	FlagSearchAttributeValue          = "search-attribute-value"
	FlagSearchAttributeType           = "search-attribute-type"
	FlagAddBadBinary                  = "add-bad-binary"
	FlagRemoveBadBinary               = "remove-bad-binary"
	FlagResetType                     = "reset-type"
	FlagResetReapplyType              = "reset-reapply-type"
	FlagResetPointsOnly               = "reset-points-only"
	FlagResetBadBinaryChecksum        = "reset-bad-binary-checksum"
	FlagListQuery                     = "query"
	FlagListQueryAlias                = []string{"q"}
	FlagListQueryUsage                = "Filter results using SQL like query. See https://docs.temporal.io/docs/system-tools/tctl/#search-workflows for details"
	FlagBatchType                     = "batch-type"
	FlagBatchTypeAlias                = []string{"bt"}
	FlagSignalName                    = "signal-name"
	FlagSignalNameAlias               = []string{"sn"}
	FlagTaskID                        = "task-id"
	FlagTaskType                      = "task-type"
	FlagMinReadLevel                  = "min-read-level"
	FlagMaxReadLevel                  = "max-read-level"
	FlagTaskVisibilityTimestamp       = "task-timestamp"
	FlagMinVisibilityTimestamp        = "min-visibility-ts"
	FlagMaxVisibilityTimestamp        = "max-visibility-ts"
	FlagStartingRPS                   = "starting-rps"
	FlagRPS                           = "rps"
	FlagJobID                         = "job-id"
	FlagJobIDAlias                    = []string{"jid"}
	FlagYes                           = "yes"
	FlagServiceConfigDir              = "service-config-dir"
	FlagServiceConfigDirAlias         = []string{"scd"}
	FlagServiceEnv                    = "service-env"
	FlagServiceEnvAlias               = []string{"se"}
	FlagServiceZone                   = "service-zone"
	FlagServiceZoneAlias              = []string{"sz"}
	FlagEnableTLS                     = "tls"
	FlagTLSCertPath                   = "tls-cert-path"
	FlagTLSKeyPath                    = "tls-key-path"
	FlagTLSCaPath                     = "tls-ca-path"
	FlagTLSDisableHostVerification    = "tls-disable-host-verification"
	FlagTLSServerName                 = "tls-server-name"
	FlagLastMessageID                 = "last-message-id"
	FlagConcurrency                   = "concurrency"
	FlagReportRate                    = "report-rate"
	FlagLowerShardBound               = "lower-shard-bound"
	FlagUpperShardBound               = "upper-shard-bound"
	FlagInputDirectory                = "input-directory"
	FlagAutoConfirm                   = "auto-confirm"
	FlagDataConverterPlugin           = "data-converter-plugin"
	FlagWebURL                        = "web-ui-url"
	FlagVersion                       = "version"

	FlagProtoType  = "type"
	FlagHexData    = "hex-data"
	FlagHexFile    = "hex-file"
	FlagBinaryFile = "binary-file"
	FlagBase64Data = "base64-data"
	FlagBase64File = "base64-file"
)

Flags used to specify cli command line arguments

Functions

func CancelWorkflow

func CancelWorkflow(c *cli.Context) error

CancelWorkflow cancels a workflow execution

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 CompleteActivity

func CompleteActivity(c *cli.Context) error

CompleteActivity completes an activity

func CountWorkflow

func CountWorkflow(c *cli.Context) error

CountWorkflow count number of workflows

func DataConverter

func DataConverter(c *cli.Context) error

DataConverter provides a data converter over a websocket for Temporal web

func DescribeBatchJob

func DescribeBatchJob(c *cli.Context) error

DescribeBatchJob describe the status of the batch job

func DescribeNamespace

func DescribeNamespace(c *cli.Context) error

DescribeNamespace updates a namespace

func DescribeTaskQueue

func DescribeTaskQueue(c *cli.Context) error

DescribeTaskQueue show pollers info of a given taskqueue

func DescribeWorkflow

func DescribeWorkflow(c *cli.Context) error

DescribeWorkflow show information about the specified workflow execution

func FailActivity

func FailActivity(c *cli.Context) error

FailActivity fails an activity

func GetValue

func GetValue(c *cli.Context) error

func HealthCheck

func HealthCheck(c *cli.Context) error

HealthCheck check frontend health.

func HistoryEventToString

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

HistoryEventToString convert HistoryEvent to string

func ListArchivedWorkflow

func ListArchivedWorkflow(c *cli.Context) error

ListArchivedWorkflow lists archived workflow executions based on filters

func ListBatchJobs

func ListBatchJobs(c *cli.Context) error

ListBatchJobs list the started batch jobs

func ListNamespaces

func ListNamespaces(c *cli.Context) error

ListNamespaces list all namespaces

func ListSearchAttributes

func ListSearchAttributes(c *cli.Context) error

ListSearchAttributes lists search attributes

func ListTaskQueuePartitions

func ListTaskQueuePartitions(c *cli.Context) error

ListTaskQueuePartitions gets all the taskqueue partition and host information.

func ListWorkflow

func ListWorkflow(c *cli.Context) error

ListWorkflow list workflow executions based on filters

func NewCliApp

func NewCliApp() *cli.App

NewCliApp instantiates a new instance of the CLI application.

func ObserveHistory

func ObserveHistory(c *cli.Context) error

ObserveHistory show the process of running workflow

func QueryWorkflow

func QueryWorkflow(c *cli.Context) error

QueryWorkflow query workflow execution

func QueryWorkflowUsingStackTrace

func QueryWorkflowUsingStackTrace(c *cli.Context) error

QueryWorkflowUsingStackTrace query workflow execution using __stack_trace as query type

func RegisterNamespace

func RegisterNamespace(c *cli.Context) error

RegisterNamespace register a namespace

func ResetInBatch

func ResetInBatch(c *cli.Context) error

ResetInBatch resets workflow in batch

func ResetWorkflow

func ResetWorkflow(c *cli.Context) error

ResetWorkflow reset workflow

func RunWorkflow

func RunWorkflow(c *cli.Context) error

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

func ScanAllWorkflow

func ScanAllWorkflow(c *cli.Context) error

ScanAllWorkflow list all workflow executions using Scan API.

func SetFactory

func SetFactory(factory ClientFactory)

SetFactory is used to set the ClientFactory global

func SetRequiredNamespaceDataKeys

func SetRequiredNamespaceDataKeys(keys []string)

SetRequiredNamespaceDataKeys will set requiredNamespaceDataKeys

func SetValue

func SetValue(c *cli.Context) error

func ShowHistory

func ShowHistory(c *cli.Context) error

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

func SignalWorkflow

func SignalWorkflow(c *cli.Context) error

SignalWorkflow signals a workflow execution

func StartBatchJob

func StartBatchJob(c *cli.Context) error

StartBatchJob starts a batch job

func TerminateBatchJob

func TerminateBatchJob(c *cli.Context) error

TerminateBatchJob stops abatch job

func TerminateWorkflow

func TerminateWorkflow(c *cli.Context) error

TerminateWorkflow terminates a workflow execution

func UpdateNamespace

func UpdateNamespace(c *cli.Context) error

UpdateNamespace updates a namespace

Types

type ClientFactory

type ClientFactory interface {
	FrontendClient(c *cli.Context) workflowservice.WorkflowServiceClient
	SDKClient(c *cli.Context, namespace string) sdkclient.Client
	HealthClient(c *cli.Context) healthpb.HealthClient
}

ClientFactory is used to construct rpc clients

func NewClientFactory

func NewClientFactory() ClientFactory

NewClientFactory creates a new ClientFactory

type HttpGetter

type HttpGetter interface {
	Get(url string) (resp *http.Response, err error)
}

HttpGetter defines http.Client.Get(...) as an interface so we can mock it

type PayloadRequest

type PayloadRequest struct {
	RequestID string `json:"requestId"`
	Payload   string `json:"payload"`
}

type PayloadResponse

type PayloadResponse struct {
	RequestID string `json:"requestId"`
	Content   string `json:"content"`
}

type SdkLogger

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

func NewSdkLogger

func NewSdkLogger(logger log.Logger) *SdkLogger

func (*SdkLogger) Debug

func (l *SdkLogger) Debug(msg string, keyvals ...interface{})

func (*SdkLogger) Error

func (l *SdkLogger) Error(msg string, keyvals ...interface{})

func (*SdkLogger) Info

func (l *SdkLogger) Info(msg string, keyvals ...interface{})

func (*SdkLogger) Warn

func (l *SdkLogger) Warn(msg string, keyvals ...interface{})

func (*SdkLogger) With

func (l *SdkLogger) With(keyvals ...interface{}) sdklog.Logger

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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