Documentation ¶
Index ¶
- Constants
- func AdminAddOrUpdateRemoteCluster(c *cli.Context)
- func AdminAddSearchAttributes(c *cli.Context)
- func AdminDBClean(c *cli.Context)
- func AdminDBScan(c *cli.Context)
- func AdminDecodeBase64(c *cli.Context)
- func AdminDecodeProto(c *cli.Context)
- func AdminDeleteWorkflow(c *cli.Context)
- func AdminDescribeCluster(c *cli.Context)
- func AdminDescribeHistoryHost(c *cli.Context)
- func AdminDescribeShard(c *cli.Context)
- func AdminDescribeTask(c *cli.Context)
- func AdminDescribeTaskQueue(c *cli.Context)
- func AdminDescribeWorkflow(c *cli.Context)
- func AdminGetDLQMessages(c *cli.Context)
- func AdminGetNamespaceIDOrName(c *cli.Context)
- func AdminGetSearchAttributes(c *cli.Context)
- func AdminGetShardID(c *cli.Context)
- func AdminListClusterMembers(c *cli.Context)
- func AdminListClusters(c *cli.Context)
- func AdminListGossipMembers(c *cli.Context)
- func AdminListShardTasks(c *cli.Context)
- func AdminListTaskQueueTasks(c *cli.Context)
- func AdminMergeDLQMessages(c *cli.Context)
- func AdminPurgeDLQMessages(c *cli.Context)
- func AdminRefreshWorkflowTasks(c *cli.Context)
- func AdminRemoveRemoteCluster(c *cli.Context)
- func AdminRemoveSearchAttributes(c *cli.Context)
- func AdminRemoveTask(c *cli.Context)
- func AdminShardManagement(c *cli.Context)
- func AdminShowWorkflow(c *cli.Context)
- func BackfillSchedule(c *cli.Context) error
- func CancelWorkflow(c *cli.Context)
- func ColorEvent(e *historypb.HistoryEvent) string
- func CompleteActivity(c *cli.Context)
- func CountWorkflow(c *cli.Context)
- func CreateDefaultDBConfig(c *cli.Context) (config.DataStore, error)
- func CreatePersistenceFactory(c *cli.Context) persistenceClient.Factory
- func CreateSchedule(c *cli.Context) error
- func DataConverter(c *cli.Context)
- func DeleteSchedule(c *cli.Context) error
- func DescribeBatchJob(c *cli.Context)
- func DescribeSchedule(c *cli.Context) error
- func DescribeTaskQueue(c *cli.Context)
- func DescribeWorkflow(c *cli.Context)
- func DescribeWorkflowWithID(c *cli.Context)
- func ErrorAndExit(msg string, err error)
- func FailActivity(c *cli.Context)
- func GetHistory(ctx context.Context, workflowClient sdkclient.Client, workflowID, runID string) (*historypb.History, error)
- func GetQPS() int
- func GetSearchAttributes(c *cli.Context)
- func GetValue(c *cli.Context) error
- func HealthCheck(c *cli.Context)
- func HistoryEventToString(e *historypb.HistoryEvent, printFully bool, maxFieldLength int) string
- func ListAllWorkflow(c *cli.Context)
- func ListArchivedWorkflow(c *cli.Context)
- func ListBatchJobs(c *cli.Context)
- func ListSchedules(c *cli.Context) error
- func ListTaskQueuePartitions(c *cli.Context)
- func ListWorkflow(c *cli.Context)
- func NewCliApp() *cli.App
- func NewContextWithCLIHeaders() (context.Context, context.CancelFunc)
- func NewContextWithTimeoutAndCLIHeaders(timeout time.Duration) (context.Context, context.CancelFunc)
- func ObserveHistory(c *cli.Context)
- func ObserveHistoryWithID(c *cli.Context)
- func QueryWorkflow(c *cli.Context)
- func QueryWorkflowUsingStackTrace(c *cli.Context)
- func ResetInBatch(c *cli.Context)
- func ResetWorkflow(c *cli.Context)
- func RunWorkflow(c *cli.Context)
- func ScanAllWorkflow(c *cli.Context)
- func SetFactory(factory ClientFactory)
- func SetRequiredNamespaceDataKeys(keys []string)
- func SetValue(c *cli.Context) error
- func ShowHistory(c *cli.Context)
- func ShowHistoryWithWID(c *cli.Context)
- func SignalWorkflow(c *cli.Context)
- func StartBatchJob(c *cli.Context)
- func StartWorkflow(c *cli.Context)
- func TerminateBatchJob(c *cli.Context)
- func TerminateWorkflow(c *cli.Context)
- func ToggleSchedule(c *cli.Context) error
- func TriggerSchedule(c *cli.Context) error
- func UpdateSchedule(c *cli.Context) error
- type BufferedWriter
- type CleanOutputDirectories
- type CleanProgressReport
- type ClientFactory
- type CorruptedExceptionMetadata
- type CorruptedExecution
- type CorruptionType
- type CorruptionTypeBreakdown
- type ExecutionCheckFailure
- type HttpGetter
- type PayloadRequest
- type PayloadResponse
- type ProgressReport
- type Rates
- type ScanOutputDirectories
- type ShardCleanOutputFiles
- type ShardCleanReport
- type ShardCleanReportFailure
- type ShardCleanReportHandled
- type ShardExecutionCountsDistribution
- type ShardScanOutputFiles
- type ShardScanReport
- type ShardScanReportExecutionsScanned
- type ShardScanReportFailure
- type VerificationResult
Constants ¶
const ( // HistoryMissing is the CorruptionType indicating that history is missing HistoryMissing CorruptionType = "history_missing" // InvalidFirstEvent is the CorruptionType indicating that the first event is invalid InvalidFirstEvent = "invalid_first_event" // OpenExecutionInvalidCurrentExecution is the CorruptionType that indicates there is an orphan concrete execution OpenExecutionInvalidCurrentExecution = "open_execution_invalid_current_execution" CorruptActivityIdPresent = "corrupt_activity_id_present" )
const ( FlagUsername = "username" FlagPassword = "password" FlagKeyspace = "keyspace" FlagAddress = "address" FlagAuth = "auth" FlagAddressWithAlias = FlagAddress + ", ad" FlagDBEngine = "db_engine" FlagDBAddress = "db_address" FlagDBPort = "db_port" FlagHistoryAddress = "history_address" FlagHistoryAddressWithAlias = FlagHistoryAddress + ", had" FlagFrontendAddress = "frontend_address" FlagFrontendAddressWithAlias = FlagFrontendAddress + ", fad" FlagNamespaceID = "namespace_id" FlagNamespace = "namespace" FlagNamespaceWithAlias = FlagNamespace + ", ns" FlagShardID = "shard_id" FlagShardIDWithAlias = FlagShardID + ", sid" FlagWorkflowID = "workflow_id" FlagWorkflowIDWithAlias = FlagWorkflowID + ", wid, w" FlagRunID = "run_id" FlagTreeID = "tree_id" FlagBranchID = "branch_id" FlagNumberOfShards = "number_of_shards" FlagRunIDWithAlias = FlagRunID + ", rid, r" FlagTargetCluster = "target_cluster" FlagMinEventID = "min_event_id" FlagMaxEventID = "max_event_id" FlagMinEventVersion = "min_event_version" FlagMaxEventVersion = "max_event_version" FlagTaskQueue = "taskqueue" FlagTaskQueueWithAlias = FlagTaskQueue + ", tq" FlagTaskQueueType = "taskqueuetype" FlagTaskQueueTypeWithAlias = FlagTaskQueueType + ", tqt" FlagWorkflowIDReusePolicy = "workflowidreusepolicy" FlagWorkflowIDReusePolicyAlias = FlagWorkflowIDReusePolicy + ", wrp" FlagCronSchedule = "cron" FlagWorkflowType = "workflow_type" FlagWorkflowTypeWithAlias = FlagWorkflowType + ", wt" FlagWorkflowStatus = "status" FlagWorkflowStatusWithAlias = FlagWorkflowStatus + ", s" FlagWorkflowExecutionTimeout = "execution_timeout" FlagWorkflowExecutionTimeoutWithAlias = FlagWorkflowExecutionTimeout + ", et" FlagWorkflowRunTimeout = "run-timeout" FlagWorkflowRunTimeoutWithAlias = FlagWorkflowRunTimeout + ", rt" FlagWorkflowTaskTimeout = "workflow_task_timeout" FlagWorkflowTaskTimeoutWithAlias = FlagWorkflowTaskTimeout + ", wtt" FlagContextTimeout = "context_timeout" FlagContextTimeoutWithAlias = FlagContextTimeout + ", ct" FlagInput = "input" FlagInputWithAlias = FlagInput + ", i" FlagInputFile = "input_file" FlagInputFileWithAlias = FlagInputFile + ", if" FlagExcludeFile = "exclude_file" FlagInputSeparator = "input_separator" FlagParallism = "input_parallism" FlagSkipCurrentOpen = "skip_current_open" FlagSkipBaseIsNotCurrent = "skip_base_is_not_current" FlagDryRun = "dry_run" FlagNonDeterministicOnly = "only_non_deterministic" FlagCluster = "cluster" FlagResult = "result" FlagIdentity = "identity" FlagDetail = "detail" FlagReason = "reason" FlagReasonWithAlias = FlagReason + ", re" FlagOpen = "open" FlagOpenWithAlias = FlagOpen + ", op" FlagMore = "more" FlagMoreWithAlias = FlagMore + ", m" FlagAll = "all" FlagAllWithAlias = FlagAll + ", a" FlagPageSize = "pagesize" FlagPageSizeWithAlias = FlagPageSize + ", ps" FlagEarliestTime = "earliest_time" FlagEarliestTimeWithAlias = FlagEarliestTime + ", et" FlagLatestTime = "latest_time" FlagLatestTimeWithAlias = FlagLatestTime + ", lt" FlagPrintEventVersion = "print_event_version" FlagPrintEventVersionWithAlias = FlagPrintEventVersion + ", pev" FlagPrintFullyDetail = "print_full" FlagPrintFullyDetailWithAlias = FlagPrintFullyDetail + ", pf" FlagPrintRawTime = "print_raw_time" FlagPrintRawTimeWithAlias = FlagPrintRawTime + ", prt" FlagPrintRaw = "print_raw" FlagPrintRawWithAlias = FlagPrintRaw + ", praw" FlagPrintDateTime = "print_datetime" FlagPrintDateTimeWithAlias = FlagPrintDateTime + ", pdt" FlagPrintMemo = "print_memo" FlagPrintMemoWithAlias = FlagPrintMemo + ", pme" FlagPrintSearchAttr = "print_search_attr" FlagPrintSearchAttrWithAlias = FlagPrintSearchAttr + ", psa" FlagPrintJSON = "print_json" FlagPrintJSONWithAlias = FlagPrintJSON + ", pjson" FlagDescription = "description" FlagDescriptionWithAlias = FlagDescription + ", desc" FlagOwnerEmail = "owner_email" FlagOwnerEmailWithAlias = FlagOwnerEmail + ", oe" FlagRetention = "retention" FlagRetentionWithAlias = FlagRetention + ", rd" FlagHistoryArchivalState = "history_archival_state" FlagHistoryArchivalStateWithAlias = FlagHistoryArchivalState + ", has" FlagHistoryArchivalURI = "history_uri" FlagHistoryArchivalURIWithAlias = FlagHistoryArchivalURI + ", huri" FlagHeartbeatedWithin = "heartbeated_within" FlagVisibilityArchivalState = "visibility_archival_state" FlagVisibilityArchivalStateWithAlias = FlagVisibilityArchivalState + ", vas" FlagVisibilityArchivalURI = "visibility_uri" FlagVisibilityArchivalURIWithAlias = FlagVisibilityArchivalURI + ", vuri" FlagName = "name" FlagNameWithAlias = FlagName + ", n" FlagOutputFilename = "output_filename" FlagOutputFilenameWithAlias = FlagOutputFilename + ", of" FlagOutputFormat = "output" FlagQueryType = "query_type" FlagQueryTypeWithAlias = FlagQueryType + ", qt" FlagQueryRejectCondition = "query_reject_condition" FlagQueryRejectConditionWithAlias = FlagQueryRejectCondition + ", qrc" FlagShowDetail = "show_detail" FlagShowDetailWithAlias = FlagShowDetail + ", sd" FlagActiveClusterName = "active_cluster" FlagActiveClusterNameWithAlias = FlagActiveClusterName + ", ac" FlagClusters = "clusters" FlagClustersWithAlias = FlagClusters + ", cl" FlagClusterMembershipRole = "role" FlagIsGlobalNamespace = "global_namespace" FlagIsGlobalNamespaceWithAlias = FlagIsGlobalNamespace + ", gd" FlagPromoteNamespace = "promote_namespace" FlagPromoteNamespaceWithAlias = FlagPromoteNamespace + ", pn" FlagNamespaceData = "namespace_data" FlagNamespaceDataWithAlias = FlagNamespaceData + ", dmd" FlagEventID = "event_id" FlagEventIDWithAlias = FlagEventID + ", eid" FlagActivityID = "activity_id" FlagActivityIDWithAlias = FlagActivityID + ", aid" FlagMaxFieldLength = "max_field_length" FlagMaxFieldLengthWithAlias = FlagMaxFieldLength + ", maxl" FlagSkipErrorMode = "skip_errors" FlagSkipErrorModeWithAlias = FlagSkipErrorMode + ", serr" FlagElasticsearchURL = "url" FlagElasticsearchUsername = "es-username" FlagElasticsearchPassword = "es-password" FlagElasticsearchIndex = "index" FlagMemoKey = "memo_key" FlagMemo = "memo" FlagMemoFile = "memo_file" FlagSearchAttributeKey = "search_attr_key" FlagSearchAttributeValue = "search_attr_value" 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" FlagListQueryWithAlias = FlagListQuery + ", q" FlagBatchType = "batch_type" FlagBatchTypeWithAlias = FlagBatchType + ", bt" FlagSignalName = "signal_name" FlagSignalNameWithAlias = FlagSignalName + ", sig" FlagTaskID = "task_id" FlagTaskType = "task_type" FlagMinTaskID = "min_task_id" FlagMaxTaskID = "max_task_id" FlagTaskVisibilityTimestamp = "task_timestamp" FlagMinVisibilityTimestamp = "min_visibility_ts" FlagMaxVisibilityTimestamp = "max_visibility_ts" FlagStartingRPS = "starting_rps" FlagRPS = "rps" FlagJobID = "job_id" FlagJobIDWithAlias = FlagJobID + ", jid" FlagYes = "yes" FlagServiceConfigDir = "service_config_dir" FlagServiceConfigDirWithAlias = FlagServiceConfigDir + ", scd" FlagServiceEnv = "service_env" FlagServiceEnvWithAlias = FlagServiceEnv + ", se" FlagServiceZone = "service_zone" FlagServiceZoneWithAlias = FlagServiceZone + ", sz" FlagEnableTLS = "tls" FlagTLSCertPath = "tls_cert_path" FlagTLSKeyPath = "tls_key_path" FlagTLSCaPath = "tls_ca_path" FlagTLSDisableHostVerification = "tls_disable_host_verification" FlagTLSServerName = "tls_server_name" FlagTLSRootCaData = "tls_ca_data" FlagTLSForceEnable = "tls_force_enable" FlagDLQType = "dlq_type" FlagDLQTypeWithAlias = FlagDLQType + ", dt" FlagMaxMessageCount = "max_message_count" FlagMaxMessageCountWithAlias = FlagMaxMessageCount + ", mmc" 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" FlagDataConverterPluginWithAlias = FlagDataConverterPlugin + ", dcp" FlagWebURL = "web_ui_url" FlagCodecEndpoint = "codec_endpoint" FlagCodecAuth = "codec_auth" FlagHeadersProviderPlugin = "headers_provider_plugin" FlagHeadersProviderPluginWithAlias = FlagHeadersProviderPlugin + ", hpp" FlagHeadersProviderPluginOptions = "headers_provider_plugin_options" FlagHeadersProviderPluginOptionsWithAlias = FlagHeadersProviderPluginOptions + ", hppo" FlagType = "type" FlagTypeWithAlias = FlagType + ", t" FlagVersion = "version" FlagPort = "port" FlagConnectionEnable = "enable_connection" FlagConnectionEnableWithAlias = FlagConnectionEnable + ", ec" FlagScheduleID = "schedule_id" FlagScheduleIDWithAlias = FlagScheduleID + ", sid, s" FlagOverlapPolicy = "overlap_policy" FlagCalendar = "calendar" FlagInterval = "interval" FlagStartTime = "start_time" FlagEndTime = "end_time" FlagJitter = "jitter" FlagTimeZone = "time_zone" FlagNotes = "notes" FlagPauseOnFailure = "pause_on_failure" FlagPause = "pause" FlagUnpause = "unpause" FlagRemainingActions = "remaining_actions" FlagCatchupWindow = "catchup_window" FlagSearchAttribute = "search_attribute" FlagProtoType = "type" FlagHexData = "hex_data" FlagHexFile = "hex_file" FlagBinaryFile = "binary_file" FlagBase64Data = "base64_data" FlagBase64File = "base64_file" FlagSkipSchemaUpdate = "skip-schema-update" )
Flags used to specify cli command line arguments
Variables ¶
This section is empty.
Functions ¶
func AdminAddOrUpdateRemoteCluster ¶
AdminAddOrUpdateRemoteCluster is used to add or update remote cluster information
func AdminAddSearchAttributes ¶
AdminAddSearchAttributes to add search attributes
func AdminDBClean ¶
AdminDBClean is the command to clean up executions
func AdminDBScan ¶
AdminDBScan is used to scan over all executions in database and detect corruptions
func AdminDecodeBase64 ¶
func AdminDecodeProto ¶
func AdminDeleteWorkflow ¶
AdminDeleteWorkflow calls admin workflow delete API to force delete a workflow's mutable state, history, and visibility records as long as it's possible. It should only be used as a troubleshooting tool since no additional check will be done before the deletion. (e.g. if a child workflow has recorded its result in the parent workflow) Please use normal workflow delete command to gracefully delete a workflow execution.
func AdminDescribeCluster ¶
AdminDescribeCluster is used to dump information about the cluster
func AdminDescribeHistoryHost ¶
AdminDescribeHistoryHost describes history host
func AdminDescribeShard ¶
AdminDescribeShard describes shard by shard id
func AdminDescribeTask ¶
AdminDescribeTask outputs the details of a task given Task Id, Task Type, Shard Id and Visibility Timestamp
func AdminDescribeTaskQueue ¶
AdminDescribeTaskQueue displays poller and status information of task queue.
func AdminDescribeWorkflow ¶
AdminDescribeWorkflow describe a new workflow execution for admin
func AdminGetDLQMessages ¶
AdminGetDLQMessages gets DLQ metadata
func AdminGetNamespaceIDOrName ¶
AdminGetNamespaceIDOrName map namespace
func AdminGetSearchAttributes ¶
AdminGetSearchAttributes to print search attributes
func AdminListClusterMembers ¶
AdminListClusterMembers outputs a list of cluster members
func AdminListClusters ¶
AdminListClusters is used to fetch information about all clusters
func AdminListGossipMembers ¶
AdminListGossipMembers outputs a list of gossip members
func AdminListShardTasks ¶
AdminListShardTasks outputs a list of a tasks for given Shard and Task Category
func AdminListTaskQueueTasks ¶
AdminListTaskQueueTasks displays task information
func AdminMergeDLQMessages ¶
AdminMergeDLQMessages merges message from DLQ
func AdminPurgeDLQMessages ¶
AdminPurgeDLQMessages deletes messages from DLQ
func AdminRefreshWorkflowTasks ¶
AdminRefreshWorkflowTasks refreshes all the tasks of a workflow
func AdminRemoveRemoteCluster ¶
AdminRemoveRemoteCluster is used to remove remote cluster information from the cluster
func AdminRemoveSearchAttributes ¶
AdminRemoveSearchAttributes to add search attributes
func AdminShardManagement ¶
AdminShardManagement describes history host
func BackfillSchedule ¶ added in v1.17.0
func CancelWorkflow ¶
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 ¶
CompleteActivity completes an activity
func CreateDefaultDBConfig ¶
CreateDefaultDBConfig return default DB configuration based on provided options
func CreatePersistenceFactory ¶
func CreatePersistenceFactory(c *cli.Context) persistenceClient.Factory
CreatePersistenceFactory returns an initialized persistence managers factory. The factory allows to easily initialize concrete persistence managers to execute commands against persistence layer
func CreateSchedule ¶ added in v1.17.0
func DataConverter ¶
DataConverter provides a data converter over a websocket for Temporal web
func DeleteSchedule ¶ added in v1.17.0
func DescribeBatchJob ¶
DescribeBatchJob describe the status of the batch job
func DescribeSchedule ¶ added in v1.17.0
func DescribeTaskQueue ¶
DescribeTaskQueue show pollers info of a given taskqueue
func DescribeWorkflow ¶
DescribeWorkflow show information about the specified workflow execution
func DescribeWorkflowWithID ¶
DescribeWorkflowWithID show information about the specified workflow execution
func ErrorAndExit ¶
ErrorAndExit print easy to understand error msg first then error detail in a new line
func GetHistory ¶
func GetHistory(ctx context.Context, workflowClient sdkclient.Client, workflowID, runID string) (*historypb.History, error)
GetHistory helper method to iterate over all pages and return complete list of history events
func GetSearchAttributes ¶
GetSearchAttributes get valid search attributes
func HistoryEventToString ¶
func HistoryEventToString(e *historypb.HistoryEvent, printFully bool, maxFieldLength int) string
HistoryEventToString convert HistoryEvent to string
func ListAllWorkflow ¶
ListAllWorkflow list all workflow executions based on filters
func ListArchivedWorkflow ¶
ListArchivedWorkflow lists archived workflow executions based on filters
func ListSchedules ¶ added in v1.17.0
func ListTaskQueuePartitions ¶
ListTaskQueuePartitions gets all the taskqueue partition and host information.
func ListWorkflow ¶
ListWorkflow list workflow executions based on filters
func NewContextWithCLIHeaders ¶ added in v1.16.1
func NewContextWithCLIHeaders() (context.Context, context.CancelFunc)
NewContextWithCLIHeaders creates context with version headers for CLI.
func NewContextWithTimeoutAndCLIHeaders ¶ added in v1.16.1
func NewContextWithTimeoutAndCLIHeaders(timeout time.Duration) (context.Context, context.CancelFunc)
NewContextWithTimeoutAndCLIHeaders creates context with timeout and version headers for CLI.
func ObserveHistory ¶
ObserveHistory show the process of running workflow
func ObserveHistoryWithID ¶
ObserveHistoryWithID show the process of running workflow
func QueryWorkflowUsingStackTrace ¶
QueryWorkflowUsingStackTrace query workflow execution using __stack_trace as query type
func RunWorkflow ¶
RunWorkflow starts a new workflow execution and print workflow progress and result
func ScanAllWorkflow ¶
ScanAllWorkflow list all workflow executions using Scan API. It should be faster than ListAllWorkflow, but result are not sorted.
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 ShowHistory ¶
ShowHistory shows the history of given workflow execution based on workflowID and runID.
func ShowHistoryWithWID ¶
ShowHistoryWithWID shows the history of given workflow with workflow_id
func SignalWorkflow ¶
SignalWorkflow signals a workflow execution
func StartWorkflow ¶
StartWorkflow starts a new workflow execution
func TerminateWorkflow ¶
TerminateWorkflow terminates a workflow execution
func ToggleSchedule ¶ added in v1.17.0
func TriggerSchedule ¶ added in v1.17.0
func UpdateSchedule ¶ added in v1.17.0
Types ¶
type BufferedWriter ¶
type BufferedWriter interface { Add(interface{}) Flush() }
BufferedWriter is used to buffer entities and write them to a file
func NewBufferedWriter ¶
func NewBufferedWriter(f *os.File) BufferedWriter
NewBufferedWriter constructs a new BufferedWriter
type CleanOutputDirectories ¶
type CleanOutputDirectories struct { ShardCleanReportDirectoryPath string SuccessfullyCleanedDirectoryPath string FailedCleanedDirectoryPath string }
CleanOutputDirectories are the directory paths for output of clean
type CleanProgressReport ¶
type CleanProgressReport struct { NumberOfShardsFinished int TotalExecutionsCount int64 SuccessfullyCleanedCount int64 FailedCleanedCount int64 TotalDBRequests int64 DatabaseRPS float64 NumberOfShardCleanFailures int64 ShardsPerHour float64 ExecutionsPerHour float64 }
CleanProgressReport represents the aggregate progress of the clean job. It is periodically printed to stdout
type ClientFactory ¶
type ClientFactory interface { FrontendClient(c *cli.Context) workflowservice.WorkflowServiceClient AdminClient(c *cli.Context) adminservice.AdminServiceClient 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 CorruptedExceptionMetadata ¶
type CorruptedExceptionMetadata struct { CorruptionType CorruptionType Note string Details string }
CorruptedExceptionMetadata is the metadata for a CorruptedExecution
type CorruptedExecution ¶
type CorruptedExecution struct { ShardID int32 NamespaceID string WorkflowID string RunID string NextEventID int64 TreeID primitives.UUID BranchID primitives.UUID CloseStatus enumspb.WorkflowExecutionStatus CorruptedExceptionMetadata CorruptedExceptionMetadata }
CorruptedExecution is the type that gets written to CorruptedExecutionFile
type CorruptionType ¶
type CorruptionType string
CorruptionType indicates the type of corruption that was found
type CorruptionTypeBreakdown ¶
type CorruptionTypeBreakdown struct { TotalHistoryMissing int64 TotalInvalidFirstEvent int64 TotalOpenExecutionInvalidCurrentExecution int64 TotalActivityIdsCorrupted int64 PercentageHistoryMissing float64 PercentageInvalidStartEvent float64 PercentageOpenExecutionInvalidCurrentExecution float64 PercentageActivityIdsCorrupted float64 }
CorruptionTypeBreakdown breaks down counts and percentages of corruption types
type ExecutionCheckFailure ¶
type ExecutionCheckFailure struct { ShardID int32 NamespaceID string WorkflowID string RunID string Note string Details string }
ExecutionCheckFailure is the type that gets written to ExecutionCheckFailureFile
type HttpGetter ¶
HttpGetter defines http.Client.Get(...) as an interface so we can mock it
type PayloadRequest ¶
type PayloadResponse ¶
type ProgressReport ¶
type ProgressReport struct { NumberOfShardsFinished int TotalExecutionsCount int64 CorruptedExecutionsCount int64 ExecutionCheckFailureCount int64 NumberOfShardScanFailures int64 PercentageCorrupted float64 PercentageCheckFailure float64 Rates Rates CorruptionTypeBreakdown CorruptionTypeBreakdown ShardExecutionCountsDistribution ShardExecutionCountsDistribution }
ProgressReport contains metadata about the scan for all shards which have been finished This is periodically printed to stdout
type Rates ¶
type Rates struct { TimeRunning string DatabaseRPS float64 TotalDBRequests int64 ShardsPerHour float64 ExecutionsPerHour float64 }
Rates indicates the rates at which the scan is progressing
type ScanOutputDirectories ¶
type ScanOutputDirectories struct { ShardScanReportDirectoryPath string ExecutionCheckFailureDirectoryPath string CorruptedExecutionDirectoryPath string }
ScanOutputDirectories are the directory paths for output of scan
type ShardCleanOutputFiles ¶
type ShardCleanOutputFiles struct { ShardCleanReportFile *os.File SuccessfullyCleanedFile *os.File FailedCleanedFile *os.File }
ShardCleanOutputFiles are the files produced for a clean of a single shard
type ShardCleanReport ¶
type ShardCleanReport struct { ShardID int32 TotalDBRequests int64 Handled *ShardCleanReportHandled Failure *ShardCleanReportFailure }
ShardCleanReport represents the result of cleaning a single shard
type ShardCleanReportFailure ¶
ShardCleanReportFailure is the part of ShardCleanReport that indicates a failure to clean some or all of the executions found in corruption file
type ShardCleanReportHandled ¶
type ShardCleanReportHandled struct { TotalExecutionsCount int64 SuccessfullyCleanedCount int64 FailedCleanedCount int64 }
ShardCleanReportHandled is the part of ShardCleanReport of executions which were read from corruption file and were attempted to be deleted
type ShardExecutionCountsDistribution ¶
type ShardExecutionCountsDistribution struct { MinExecutions *int64 MaxExecutions *int64 AverageExecutions int64 }
ShardExecutionCountsDistribution breaks down stats on the distribution of executions per shard
type ShardScanOutputFiles ¶
type ShardScanOutputFiles struct { ShardScanReportFile *os.File ExecutionCheckFailureFile *os.File CorruptedExecutionFile *os.File }
ShardScanOutputFiles are the files produced for a scan of a single shard
type ShardScanReport ¶
type ShardScanReport struct { ShardID int32 TotalDBRequests int64 Scanned *ShardScanReportExecutionsScanned Failure *ShardScanReportFailure }
ShardScanReport is the type that gets written to ShardScanReportFile
type ShardScanReportExecutionsScanned ¶
type ShardScanReportExecutionsScanned struct { TotalExecutionsCount int64 CorruptedExecutionsCount int64 ExecutionCheckFailureCount int64 CorruptionTypeBreakdown CorruptionTypeBreakdown }
ShardScanReportExecutionsScanned is the part of the ShardScanReport of executions which were scanned
type ShardScanReportFailure ¶
ShardScanReportFailure is the part of the ShardScanReport that indicates failure to scan all or part of the shard
type VerificationResult ¶
type VerificationResult int
VerificationResult is the result of running a verification
const ( // VerificationResultNoCorruption indicates that no corruption was found VerificationResultNoCorruption VerificationResult = iota // VerificationResultDetectedCorruption indicates a corruption was found VerificationResultDetectedCorruption // VerificationResultCheckFailure indicates there was a failure to check corruption VerificationResultCheckFailure )
Source Files ¶
- activity.go
- admin.go
- adminClusterCommands.go
- adminCommands.go
- adminDBCleanCommand.go
- adminDBCommandsFileWriter.go
- adminDBScanCommand.go
- adminDLQCommands.go
- adminTaskQueueCommands.go
- admin_cluster_search_attributes_commands.go
- admin_decode_commands.go
- app.go
- batch.go
- cluster.go
- clusterCommands.go
- cluster_search_attributes_commands.go
- config.go
- data_converter.go
- data_converter_commands.go
- defs copy.go
- defs.go
- factory.go
- flags.go
- namespace.go
- namespaceCommands.go
- namespaceUtils.go
- persistenceUtil.go
- schedule.go
- schedule_commands.go
- taskQueue.go
- taskQueueCommands.go
- util.go
- workflow.go
- workflowBatchCommands.go
- workflowCommands.go