Documentation
¶
Index ¶
- Constants
- Variables
- type BackendType
- type BasicInfo
- type ContinueAsNewDumpResponse
- type ContinueAsNewInput
- type DebugDumpResponse
- type ExecuteRpcSignalRequest
- type FailWorkflowSignalRequest
- type GetCurrentTimerInfosQueryResponse
- type GetDataAttributesQueryRequest
- type GetDataAttributesQueryResponse
- type GetScheduledGreedyTimerTimesQueryResponse
- type InternalTimerStatus
- type InterpreterWorkflowInput
- type InterpreterWorkflowOutput
- type PrepareRpcQueryRequest
- type PrepareRpcQueryResponse
- type SkipTimerSignalRequest
- type StaleSkipTimerSignal
- type StateDecideActivityInput
- type StateExecutionCompletedCommands
- type StateExecutionCounterInfo
- type StateExecutionResumeInfo
- type StateExecutionStatus
- type StateStartActivityInput
- type TimerInfo
- type WaitForStateCompletionWorkflowOutput
Constants ¶
View Source
const ( EnvNameDebugMode = "DEBUG_MODE" DefaultContinueAsNewPageSizeInBytes = 1024 * 1024 // HttpStatusCodeSpecial4xxError1 is for poll timeout, RPC worker execution error HttpStatusCodeSpecial4xxError1 = 420 // HttpStatusCodeSpecial4xxError2 is for RPC acquire locking failure HttpStatusCodeSpecial4xxError2 = 450 TaskQueue = "Interpreter_DEFAULT" StateStartApi = "/api/v1/workflowState/start" StateDecideApi = "/api/v1/workflowState/decide" WorkflowWorkerRpcApi = "/api/v1/workflowWorker/rpc" GetDataAttributesWorkflowQueryType = "GetDataAttributes" GetSearchAttributesWorkflowQueryType = "GetSearchAttributes" GetCurrentTimerInfosQueryType = "GetCurrentTimerInfos" ContinueAsNewDumpByPageQueryType = "ContinueAsNewDumpByPage" DebugDumpQueryType = "DebugNewDump" PrepareRpcQueryType = "PrepareRpcQueryType" ExecuteOptimisticLockingRpcUpdateType = "ExecuteOptimisticLockingRpcUpdate" SearchAttributeGlobalVersion = "IwfGlobalWorkflowVersion" SearchAttributeExecutingStateIds = "IwfExecutingStateIds" SearchAttributeIwfWorkflowType = "IwfWorkflowType" BackendTypeCadence BackendType = "cadence" BackendTypeTemporal BackendType = "temporal" IwfSystemConstPrefix = "__IwfSystem_" SkipTimerSignalChannelName = IwfSystemConstPrefix + "SkipTimerChannel" FailWorkflowSignalChannelName = IwfSystemConstPrefix + "FailWorkflowChannel" UpdateConfigSignalChannelName = IwfSystemConstPrefix + "UpdateWorkflowConfig" ExecuteRpcSignalChannelName = IwfSystemConstPrefix + "ExecuteRpc" StateCompletionSignalChannelName = IwfSystemConstPrefix + "StateCompletion" TriggerContinueAsNewSignalChannelName = IwfSystemConstPrefix + "TriggerContinueAsNew" WorkerUrlMemoKey = IwfSystemConstPrefix + "WorkerUrl" UseMemoForDataAttributesKey = IwfSystemConstPrefix + "UseMemoForDataAttributes" WorkflowRequestId = IwfSystemConstPrefix + "WorkflowRequestId" )
View Source
const ( GracefulCompletingWorkflowStateId = "_SYS_GRACEFUL_COMPLETING_WORKFLOW" ForceCompletingWorkflowStateId = "_SYS_FORCE_COMPLETING_WORKFLOW" ForceFailingWorkflowStateId = "_SYS_FORCE_FAILING_WORKFLOW" DeadEndWorkflowStateId = "_SYS_DEAD_END" )
Variables ¶
View Source
var ValidClosingWorkflowStateId = map[string]bool{ GracefulCompletingWorkflowStateId: true, ForceCompletingWorkflowStateId: true, ForceFailingWorkflowStateId: true, DeadEndWorkflowStateId: true, }
View Source
var ValidIwfSystemSignalNames = map[string]bool{ SkipTimerSignalChannelName: true, FailWorkflowSignalChannelName: true, UpdateConfigSignalChannelName: true, ExecuteRpcSignalChannelName: true, }
Functions ¶
This section is empty.
Types ¶
type BackendType ¶
type BackendType string
type ContinueAsNewDumpResponse ¶ added in v1.5.0
type ContinueAsNewDumpResponse struct {
StatesToStartFromBeginning []iwfidl.StateMovement // StatesToStartFromBeginning means they haven't started in the previous run
StateExecutionsToResume map[string]StateExecutionResumeInfo // stateExeId to StateExecutionResumeInfo
InterStateChannelReceived map[string][]*iwfidl.EncodedObject
SignalsReceived map[string][]*iwfidl.EncodedObject
StateExecutionCounterInfo StateExecutionCounterInfo
StateOutputs []iwfidl.StateCompletionOutput
StaleSkipTimerSignals []StaleSkipTimerSignal
DataObjects []iwfidl.KeyValue
SearchAttributes []iwfidl.SearchAttribute
}
type ContinueAsNewInput ¶ added in v1.5.0
type ContinueAsNewInput struct {
PreviousInternalRunId string `json:"previousInternalRunId"` // for loading from previous run
}
type DebugDumpResponse ¶ added in v1.5.0
type DebugDumpResponse struct {
Config iwfidl.WorkflowConfig
Snapshot ContinueAsNewDumpResponse
FiringTimersUnixTimestamps []int64
}
type ExecuteRpcSignalRequest ¶ added in v1.5.0
type ExecuteRpcSignalRequest struct {
RpcInput *iwfidl.EncodedObject `json:"rpcInput,omitempty"`
RpcOutput *iwfidl.EncodedObject `json:"rpcOutput,omitempty"`
UpsertDataObjects []iwfidl.KeyValue `json:"upsertDataObjects,omitempty"`
UpsertSearchAttributes []iwfidl.SearchAttribute `json:"upsertSearchAttributes,omitempty"`
StateDecision *iwfidl.StateDecision `json:"stateDecision,omitempty"`
RecordEvents []iwfidl.KeyValue `json:"recordEvents,omitempty"`
InterStateChannelPublishing []iwfidl.InterStateChannelPublishing `json:"interStateChannelPublishing,omitempty"`
}
type FailWorkflowSignalRequest ¶ added in v1.5.0
type FailWorkflowSignalRequest struct {
Reason string
}
type GetCurrentTimerInfosQueryResponse ¶ added in v1.2.0
type GetDataAttributesQueryRequest ¶ added in v1.10.0
type GetDataAttributesQueryRequest struct {
Keys []string
}
type GetDataAttributesQueryResponse ¶ added in v1.10.0
type GetScheduledGreedyTimerTimesQueryResponse ¶ added in v1.16.0
type GetScheduledGreedyTimerTimesQueryResponse struct {
PendingScheduled []*TimerInfo
}
type InternalTimerStatus ¶ added in v1.2.0
type InternalTimerStatus string
const ( TimerPending InternalTimerStatus = "Pending" TimerFired InternalTimerStatus = "Fired" TimerSkipped InternalTimerStatus = "Skipped" )
type InterpreterWorkflowInput ¶
type InterpreterWorkflowInput struct {
IwfWorkflowType string `json:"iwfWorkflowType,omitempty"`
IwfWorkerUrl string `json:"iwfWorkerUrl,omitempty"`
StartStateId *string `json:"startStateId,omitempty"`
WaitForCompletionStateExecutionIds []string `json:"waitForCompletionStateExecutionIds,omitempty"`
WaitForCompletionStateIds []string `json:"waitForCompletionStateIds,omitempty"`
StateInput *iwfidl.EncodedObject `json:"stateInput,omitempty"`
StateOptions *iwfidl.WorkflowStateOptions `json:"stateOptions,omitempty"`
InitSearchAttributes []iwfidl.SearchAttribute `json:"initSearchAttributes,omitempty"`
InitDataAttributes []iwfidl.KeyValue `json:"initDataAttributes,omitempty"`
UseMemoForDataAttributes bool `json:"useMemoForDataAttributes,omitempty"`
Config iwfidl.WorkflowConfig `json:"config,omitempty"`
// IsResumeFromContinueAsNew indicate this is input for continueAsNew
// when true, will ignore StartStateId, StateInput, StateOptions, InitSearchAttributes
IsResumeFromContinueAsNew bool `json:"isResumeFromContinueAsNew,omitempty"`
ContinueAsNewInput *ContinueAsNewInput `json:"continueAsNewInput,omitempty"`
}
type InterpreterWorkflowOutput ¶
type InterpreterWorkflowOutput struct {
StateCompletionOutputs []iwfidl.StateCompletionOutput `json:"stateCompletionOutputs,omitempty"`
}
type PrepareRpcQueryRequest ¶ added in v1.5.0
type PrepareRpcQueryRequest struct {
DataObjectsLoadingPolicy *iwfidl.PersistenceLoadingPolicy
CachedDataObjectsLoadingPolicy *iwfidl.PersistenceLoadingPolicy
SearchAttributesLoadingPolicy *iwfidl.PersistenceLoadingPolicy
}
type PrepareRpcQueryResponse ¶ added in v1.5.0
type PrepareRpcQueryResponse struct {
DataObjects []iwfidl.KeyValue
SearchAttributes []iwfidl.SearchAttribute
WorkflowRunId string
WorkflowStartedTimestamp int64
IwfWorkflowType string
IwfWorkerUrl string
SignalChannelInfo map[string]iwfidl.ChannelInfo
InternalChannelInfo map[string]iwfidl.ChannelInfo
}
type SkipTimerSignalRequest ¶ added in v1.2.0
type StaleSkipTimerSignal ¶ added in v1.5.0
type StateDecideActivityInput ¶
type StateDecideActivityInput struct {
IwfWorkerUrl string
Request iwfidl.WorkflowStateDecideRequest
}
type StateExecutionCompletedCommands ¶ added in v1.5.0
type StateExecutionCompletedCommands struct {
CompletedTimerCommands map[int]InternalTimerStatus `json:"completedTimerCommands"`
CompletedSignalCommands map[int]*iwfidl.EncodedObject `json:"completedSignalCommands"`
CompletedInterStateChannelCommands map[int]*iwfidl.EncodedObject `json:"completedInterStateChannelCommands"`
}
type StateExecutionCounterInfo ¶ added in v1.3.0
type StateExecutionResumeInfo ¶ added in v1.5.0
type StateExecutionResumeInfo struct {
StateExecutionId string `json:"stateExecutionId"`
State iwfidl.StateMovement `json:"state"`
StateExecutionCompletedCommands StateExecutionCompletedCommands `json:"stateExecutionCompletedCommands"`
CommandRequest iwfidl.CommandRequest `json:"commandRequest"`
StateExecutionLocals []iwfidl.KeyValue `json:"stateExecutionLocals"`
}
type StateExecutionStatus ¶ added in v1.5.0
type StateExecutionStatus string
const CompletedStateExecutionStatus StateExecutionStatus = "Completed" // this will process as normal
const ExecuteApiFailedAndProceed StateExecutionStatus = "ExecuteApiFailedAndProceed" // this will proceed to a different state
const FailureStateExecutionStatus StateExecutionStatus = "Failure"
const WaitingCommandsStateExecutionStatus StateExecutionStatus = "WaitingCommands" // this will put the state into a special pending queue for continueAsNew from waiting command
type StateStartActivityInput ¶
type StateStartActivityInput struct {
IwfWorkerUrl string
Request iwfidl.WorkflowStateStartRequest
}
type TimerInfo ¶ added in v1.2.0
type TimerInfo struct {
CommandId *string
FiringUnixTimestampSeconds int64
Status InternalTimerStatus
}
func ValidateTimerSkipRequest ¶ added in v1.2.0
func ValidateTimerSkipRequest( stateExeTimerInfos map[string][]*TimerInfo, stateExeId, timerId string, timerIdx int, ) (*TimerInfo, bool)
ValidateTimerSkipRequest validates if the skip timer request is valid return true if it's valid, along with the timer pointer use timerIdx if timerId is not empty
type WaitForStateCompletionWorkflowOutput ¶ added in v1.8.0
type WaitForStateCompletionWorkflowOutput struct {
StateCompletionOutput iwfidl.StateCompletionOutput `json:"stateCompletionOutput,omitempty"`
}
Directories
¶
| Path | Synopsis |
|---|---|
|
temporal
Package temporal is a generated GoMock package.
|
Package temporal is a generated GoMock package. |
|
common
|
|
|
interfaces
Package interfaces is a generated GoMock package.
|
Package interfaces is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.