Documentation ¶
Overview ¶
Package history is a generated GoMock package.
Package history is a generated GoMock package.
Package history is a generated GoMock package.
Package history is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GenerateReplicationTask(targetClusters []string, task *persistence.ReplicationTaskInfo, ...) (*replicator.ReplicationTask, string, error)
- func GetAllHistory(historyV2Mgr persistence.HistoryManager, metricsClient metrics.Client, ...) (*shared.History, []*shared.History, error)
- func NewEngineWithShardContext(shard shard.Context, visibilityMgr persistence.VisibilityManager, ...) engine.Engine
- func NewService(params *service.BootstrapParams) (resource.Resource, error)
- type Handler
- func (h *Handler) CloseShard(ctx context.Context, request *gen.CloseShardRequest) (retError error)
- func (h *Handler) CreateEngine(shardContext shard.Context) engine.Engine
- func (h *Handler) DescribeHistoryHost(ctx context.Context, request *gen.DescribeHistoryHostRequest) (resp *gen.DescribeHistoryHostResponse, retError error)
- func (h *Handler) DescribeMutableState(ctx context.Context, request *hist.DescribeMutableStateRequest) (resp *hist.DescribeMutableStateResponse, retError error)
- func (h *Handler) DescribeWorkflowExecution(ctx context.Context, request *hist.DescribeWorkflowExecutionRequest) (resp *gen.DescribeWorkflowExecutionResponse, retError error)
- func (h *Handler) GetDLQReplicationMessages(ctx context.Context, request *r.GetDLQReplicationMessagesRequest) (resp *r.GetDLQReplicationMessagesResponse, retError error)
- func (h *Handler) GetMutableState(ctx context.Context, getRequest *hist.GetMutableStateRequest) (resp *hist.GetMutableStateResponse, retError error)
- func (h *Handler) GetReplicationMessages(ctx context.Context, request *r.GetReplicationMessagesRequest) (resp *r.GetReplicationMessagesResponse, retError error)
- func (h *Handler) Health(ctx context.Context) (*health.HealthStatus, error)
- func (h *Handler) MergeDLQMessages(ctx context.Context, request *r.MergeDLQMessagesRequest) (resp *r.MergeDLQMessagesResponse, retError error)
- func (h *Handler) PollMutableState(ctx context.Context, getRequest *hist.PollMutableStateRequest) (resp *hist.PollMutableStateResponse, retError error)
- func (h *Handler) PrepareToStop()
- func (h *Handler) PurgeDLQMessages(ctx context.Context, request *r.PurgeDLQMessagesRequest) (retError error)
- func (h *Handler) QueryWorkflow(ctx context.Context, request *hist.QueryWorkflowRequest) (resp *hist.QueryWorkflowResponse, retError error)
- func (h *Handler) ReadDLQMessages(ctx context.Context, request *r.ReadDLQMessagesRequest) (resp *r.ReadDLQMessagesResponse, retError error)
- func (h *Handler) ReapplyEvents(ctx context.Context, request *hist.ReapplyEventsRequest) (retError error)
- func (h *Handler) RecordActivityTaskHeartbeat(ctx context.Context, wrappedRequest *hist.RecordActivityTaskHeartbeatRequest) (resp *gen.RecordActivityTaskHeartbeatResponse, retError error)
- func (h *Handler) RecordActivityTaskStarted(ctx context.Context, recordRequest *hist.RecordActivityTaskStartedRequest) (resp *hist.RecordActivityTaskStartedResponse, retError error)
- func (h *Handler) RecordChildExecutionCompleted(ctx context.Context, request *hist.RecordChildExecutionCompletedRequest) (retError error)
- func (h *Handler) RecordDecisionTaskStarted(ctx context.Context, recordRequest *hist.RecordDecisionTaskStartedRequest) (resp *hist.RecordDecisionTaskStartedResponse, retError error)
- func (h *Handler) RefreshWorkflowTasks(ctx context.Context, request *hist.RefreshWorkflowTasksRequest) (retError error)
- func (h *Handler) RegisterHandler()
- func (h *Handler) RemoveSignalMutableState(ctx context.Context, wrappedRequest *hist.RemoveSignalMutableStateRequest) (retError error)
- func (h *Handler) RemoveTask(ctx context.Context, request *gen.RemoveTaskRequest) (retError error)
- func (h *Handler) ReplicateEvents(ctx context.Context, replicateRequest *hist.ReplicateEventsRequest) (retError error)
- func (h *Handler) ReplicateEventsV2(ctx context.Context, replicateRequest *hist.ReplicateEventsV2Request) (retError error)
- func (h *Handler) ReplicateRawEvents(ctx context.Context, replicateRequest *hist.ReplicateRawEventsRequest) (retError error)
- func (h *Handler) RequestCancelWorkflowExecution(ctx context.Context, request *hist.RequestCancelWorkflowExecutionRequest) (retError error)
- func (h *Handler) ResetStickyTaskList(ctx context.Context, resetRequest *hist.ResetStickyTaskListRequest) (resp *hist.ResetStickyTaskListResponse, retError error)
- func (h *Handler) ResetWorkflowExecution(ctx context.Context, wrappedRequest *hist.ResetWorkflowExecutionRequest) (resp *gen.ResetWorkflowExecutionResponse, retError error)
- func (h *Handler) RespondActivityTaskCanceled(ctx context.Context, wrappedRequest *hist.RespondActivityTaskCanceledRequest) (retError error)
- func (h *Handler) RespondActivityTaskCompleted(ctx context.Context, wrappedRequest *hist.RespondActivityTaskCompletedRequest) (retError error)
- func (h *Handler) RespondActivityTaskFailed(ctx context.Context, wrappedRequest *hist.RespondActivityTaskFailedRequest) (retError error)
- func (h *Handler) RespondDecisionTaskCompleted(ctx context.Context, wrappedRequest *hist.RespondDecisionTaskCompletedRequest) (resp *hist.RespondDecisionTaskCompletedResponse, retError error)
- func (h *Handler) RespondDecisionTaskFailed(ctx context.Context, wrappedRequest *hist.RespondDecisionTaskFailedRequest) (retError error)
- func (h *Handler) ScheduleDecisionTask(ctx context.Context, request *hist.ScheduleDecisionTaskRequest) (retError error)
- func (h *Handler) SignalWithStartWorkflowExecution(ctx context.Context, ...) (resp *gen.StartWorkflowExecutionResponse, retError error)
- func (h *Handler) SignalWorkflowExecution(ctx context.Context, wrappedRequest *hist.SignalWorkflowExecutionRequest) (retError error)
- func (h *Handler) Start()
- func (h *Handler) StartWorkflowExecution(ctx context.Context, wrappedRequest *hist.StartWorkflowExecutionRequest) (resp *gen.StartWorkflowExecutionResponse, retError error)
- func (h *Handler) Stop()
- func (h *Handler) SyncActivity(ctx context.Context, syncActivityRequest *hist.SyncActivityRequest) (retError error)
- func (h *Handler) SyncShardStatus(ctx context.Context, syncShardStatusRequest *hist.SyncShardStatusRequest) (retError error)
- func (h *Handler) TerminateWorkflowExecution(ctx context.Context, wrappedRequest *hist.TerminateWorkflowExecutionRequest) (retError error)
- type LocalTimerGate
- type LocalTimerGateImpl
- type MockProcessor
- type MockQueueAckMgr
- type MockReplicatorQueueProcessor
- type MockReplicatorQueueProcessorMockRecorder
- type MockTimerProcessor
- type MockTimerQueueAckMgr
- type MockconflictResolver
- type MockconflictResolverMockRecorder
- type MocktimerQueueProcessor
- func (m *MocktimerQueueProcessor) EXPECT() *MocktimerQueueProcessorMockRecorder
- func (m *MocktimerQueueProcessor) FailoverDomain(domainIDs map[string]struct{})
- func (m *MocktimerQueueProcessor) LockTaskProcessing()
- func (m *MocktimerQueueProcessor) NotifyNewTimers(clusterName string, timerTask []persistence.Task)
- func (m *MocktimerQueueProcessor) Start()
- func (m *MocktimerQueueProcessor) Stop()
- func (m *MocktimerQueueProcessor) UnlockTaskProcessing()
- type MocktimerQueueProcessorMockRecorder
- func (mr *MocktimerQueueProcessorMockRecorder) FailoverDomain(domainIDs interface{}) *gomock.Call
- func (mr *MocktimerQueueProcessorMockRecorder) LockTaskProcessing() *gomock.Call
- func (mr *MocktimerQueueProcessorMockRecorder) NotifyNewTimers(clusterName, timerTask interface{}) *gomock.Call
- func (mr *MocktimerQueueProcessorMockRecorder) Start() *gomock.Call
- func (mr *MocktimerQueueProcessorMockRecorder) Stop() *gomock.Call
- func (mr *MocktimerQueueProcessorMockRecorder) UnlockTaskProcessing() *gomock.Call
- type MocktransferQueueProcessor
- func (m *MocktransferQueueProcessor) EXPECT() *MocktransferQueueProcessorMockRecorder
- func (m *MocktransferQueueProcessor) FailoverDomain(domainIDs map[string]struct{})
- func (m *MocktransferQueueProcessor) LockTaskProcessing()
- func (m *MocktransferQueueProcessor) NotifyNewTask(clusterName string, transferTasks []persistence.Task)
- func (m *MocktransferQueueProcessor) Start()
- func (m *MocktransferQueueProcessor) Stop()
- func (m *MocktransferQueueProcessor) UnlockTaskProcessing()
- type MocktransferQueueProcessorMockRecorder
- func (mr *MocktransferQueueProcessorMockRecorder) FailoverDomain(domainIDs interface{}) *gomock.Call
- func (mr *MocktransferQueueProcessorMockRecorder) LockTaskProcessing() *gomock.Call
- func (mr *MocktransferQueueProcessorMockRecorder) NotifyNewTask(clusterName, transferTasks interface{}) *gomock.Call
- func (mr *MocktransferQueueProcessorMockRecorder) Start() *gomock.Call
- func (mr *MocktransferQueueProcessorMockRecorder) Stop() *gomock.Call
- func (mr *MocktransferQueueProcessorMockRecorder) UnlockTaskProcessing() *gomock.Call
- type QueueProcessorOptions
- type RemoteTimerGate
- type RemoteTimerGateImpl
- func (timerGate *RemoteTimerGateImpl) Close()
- func (timerGate *RemoteTimerGateImpl) FireAfter(now time.Time) bool
- func (timerGate *RemoteTimerGateImpl) FireChan() <-chan struct{}
- func (timerGate *RemoteTimerGateImpl) SetCurrentTime(currentTime time.Time) bool
- func (timerGate *RemoteTimerGateImpl) Update(nextTime time.Time) bool
- type ReplicatorQueueProcessor
- type Service
- type TimerGate
Constants ¶
const ( // TerminateIfRunningReason reason for terminateIfRunning TerminateIfRunningReason = "TerminateIfRunning Policy" // TerminateIfRunningDetailsTemplate details template for terminateIfRunning TerminateIfRunningDetailsTemplate = "New runID: %s" )
Variables ¶
var ( // ErrDuplicate is exported temporarily for integration test ErrDuplicate = errors.New("duplicate task, completing it") // ErrMaxAttemptsExceeded is exported temporarily for integration test ErrMaxAttemptsExceeded = errors.New("maximum attempts exceeded to update history") // ErrStaleState is the error returned during state update indicating that cached mutable state could be stale ErrStaleState = errors.New("cache mutable state could potentially be stale") // ErrActivityTaskNotFound is the error to indicate activity task could be duplicate and activity already completed ErrActivityTaskNotFound = &workflow.EntityNotExistsError{Message: "activity task not found"} // ErrWorkflowCompleted is the error to indicate workflow execution already completed ErrWorkflowCompleted = &workflow.EntityNotExistsError{Message: "workflow execution already completed"} // ErrWorkflowParent is the error to parent execution is given and mismatch ErrWorkflowParent = &workflow.EntityNotExistsError{Message: "workflow parent does not match"} // ErrDeserializingToken is the error to indicate task token is invalid ErrDeserializingToken = &workflow.BadRequestError{Message: "error deserializing task token"} // ErrSignalOverSize is the error to indicate signal input size is > 256K ErrSignalOverSize = &workflow.BadRequestError{Message: "signal input size is over 256K"} // ErrCancellationAlreadyRequested is the error indicating cancellation for target workflow is already requested ErrCancellationAlreadyRequested = &workflow.CancellationAlreadyRequestedError{Message: "cancellation already requested for this workflow execution"} // ErrSignalsLimitExceeded is the error indicating limit reached for maximum number of signal events ErrSignalsLimitExceeded = &workflow.LimitExceededError{Message: "exceeded workflow execution limit for signal events"} // ErrQueryEnteredInvalidState is error indicating query entered invalid state ErrQueryEnteredInvalidState = &workflow.BadRequestError{Message: "query entered invalid state, this should be impossible"} // ErrQueryWorkflowBeforeFirstDecision is error indicating that query was attempted before first decision task completed ErrQueryWorkflowBeforeFirstDecision = &workflow.QueryFailedError{Message: "workflow must handle at least one decision task before it can be queried"} // ErrConsistentQueryNotEnabled is error indicating that consistent query was requested but either cluster or domain does not enable consistent query ErrConsistentQueryNotEnabled = &workflow.BadRequestError{Message: "cluster or domain does not enable strongly consistent query but strongly consistent query was requested"} // ErrConsistentQueryBufferExceeded is error indicating that too many consistent queries have been buffered and until buffered queries are finished new consistent queries cannot be buffered ErrConsistentQueryBufferExceeded = &workflow.InternalServiceError{Message: "consistent query buffer is full, cannot accept new consistent queries"} // FailedWorkflowCloseState is a set of failed workflow close states, used for start workflow policy // for start workflow execution API FailedWorkflowCloseState = map[int]bool{ persistence.WorkflowCloseStatusFailed: true, persistence.WorkflowCloseStatusCanceled: true, persistence.WorkflowCloseStatusTerminated: true, persistence.WorkflowCloseStatusTimedOut: true, } )
Functions ¶
func GenerateReplicationTask ¶ added in v0.5.0
func GenerateReplicationTask( targetClusters []string, task *persistence.ReplicationTaskInfo, historyV2Mgr persistence.HistoryManager, metricsClient metrics.Client, history *shared.History, shardID *int, ) (*replicator.ReplicationTask, string, error)
GenerateReplicationTask generate replication task
func GetAllHistory ¶ added in v0.5.0
func GetAllHistory( historyV2Mgr persistence.HistoryManager, metricsClient metrics.Client, byBatch bool, firstEventID int64, nextEventID int64, branchToken []byte, shardID *int, ) (*shared.History, []*shared.History, error)
GetAllHistory return history
func NewEngineWithShardContext ¶
func NewEngineWithShardContext( shard shard.Context, visibilityMgr persistence.VisibilityManager, matching matching.Client, historyClient hc.Client, publicClient workflowserviceclient.Interface, historyEventNotifier events.Notifier, publisher messaging.Producer, config *config.Config, replicationTaskFetchers replication.TaskFetchers, rawMatchingClient matching.Client, queueTaskProcessor task.Processor, ) engine.Engine
NewEngineWithShardContext creates an instance of history engine
func NewService ¶
func NewService( params *service.BootstrapParams, ) (resource.Resource, error)
NewService builds a new cadence-history service
Types ¶
type Handler ¶
Handler - Thrift handler interface for history service
func NewHandler ¶
NewHandler creates a thrift handler for the history service
func (*Handler) CloseShard ¶ added in v0.9.0
func (h *Handler) CloseShard( ctx context.Context, request *gen.CloseShardRequest, ) (retError error)
CloseShard closes a shard hosted by this instance
func (*Handler) CreateEngine ¶
CreateEngine is implementation for HistoryEngineFactory used for creating the engine instance for shard
func (*Handler) DescribeHistoryHost ¶ added in v0.3.13
func (h *Handler) DescribeHistoryHost( ctx context.Context, request *gen.DescribeHistoryHostRequest, ) (resp *gen.DescribeHistoryHostResponse, retError error)
DescribeHistoryHost returns information about the internal states of a history host
func (*Handler) DescribeMutableState ¶ added in v0.3.13
func (h *Handler) DescribeMutableState( ctx context.Context, request *hist.DescribeMutableStateRequest, ) (resp *hist.DescribeMutableStateResponse, retError error)
DescribeMutableState - returns the internal analysis of workflow execution state
func (*Handler) DescribeWorkflowExecution ¶ added in v0.3.3
func (h *Handler) DescribeWorkflowExecution( ctx context.Context, request *hist.DescribeWorkflowExecutionRequest, ) (resp *gen.DescribeWorkflowExecutionResponse, retError error)
DescribeWorkflowExecution returns information about the specified workflow execution.
func (*Handler) GetDLQReplicationMessages ¶ added in v0.12.0
func (h *Handler) GetDLQReplicationMessages( ctx context.Context, request *r.GetDLQReplicationMessagesRequest, ) (resp *r.GetDLQReplicationMessagesResponse, retError error)
GetDLQReplicationMessages is called by remote peers to get replicated messages for DLQ merging
func (*Handler) GetMutableState ¶ added in v0.3.5
func (h *Handler) GetMutableState( ctx context.Context, getRequest *hist.GetMutableStateRequest, ) (resp *hist.GetMutableStateResponse, retError error)
GetMutableState - returns the id of the next event in the execution's history
func (*Handler) GetReplicationMessages ¶ added in v0.9.0
func (h *Handler) GetReplicationMessages( ctx context.Context, request *r.GetReplicationMessagesRequest, ) (resp *r.GetReplicationMessagesResponse, retError error)
GetReplicationMessages is called by remote peers to get replicated messages for cross DC replication
func (*Handler) MergeDLQMessages ¶ added in v0.12.0
func (h *Handler) MergeDLQMessages( ctx context.Context, request *r.MergeDLQMessagesRequest, ) (resp *r.MergeDLQMessagesResponse, retError error)
MergeDLQMessages reads and applies replication DLQ messages
func (*Handler) PollMutableState ¶ added in v0.9.3
func (h *Handler) PollMutableState( ctx context.Context, getRequest *hist.PollMutableStateRequest, ) (resp *hist.PollMutableStateResponse, retError error)
PollMutableState - returns the id of the next event in the execution's history
func (*Handler) PrepareToStop ¶ added in v0.12.0
func (h *Handler) PrepareToStop()
PrepareToStop starts graceful traffic drain in preparation for shutdown
func (*Handler) PurgeDLQMessages ¶ added in v0.12.0
func (h *Handler) PurgeDLQMessages( ctx context.Context, request *r.PurgeDLQMessagesRequest, ) (retError error)
PurgeDLQMessages deletes replication DLQ messages
func (*Handler) QueryWorkflow ¶ added in v0.9.0
func (h *Handler) QueryWorkflow( ctx context.Context, request *hist.QueryWorkflowRequest, ) (resp *hist.QueryWorkflowResponse, retError error)
QueryWorkflow queries a workflow.
func (*Handler) ReadDLQMessages ¶ added in v0.12.0
func (h *Handler) ReadDLQMessages( ctx context.Context, request *r.ReadDLQMessagesRequest, ) (resp *r.ReadDLQMessagesResponse, retError error)
ReadDLQMessages reads replication DLQ messages
func (*Handler) ReapplyEvents ¶ added in v0.9.3
func (h *Handler) ReapplyEvents( ctx context.Context, request *hist.ReapplyEventsRequest, ) (retError error)
ReapplyEvents applies stale events to the current workflow and the current run
func (*Handler) RecordActivityTaskHeartbeat ¶
func (h *Handler) RecordActivityTaskHeartbeat( ctx context.Context, wrappedRequest *hist.RecordActivityTaskHeartbeatRequest, ) (resp *gen.RecordActivityTaskHeartbeatResponse, retError error)
RecordActivityTaskHeartbeat - Record Activity Task Heart beat.
func (*Handler) RecordActivityTaskStarted ¶
func (h *Handler) RecordActivityTaskStarted( ctx context.Context, recordRequest *hist.RecordActivityTaskStartedRequest, ) (resp *hist.RecordActivityTaskStartedResponse, retError error)
RecordActivityTaskStarted - Record Activity Task started.
func (*Handler) RecordChildExecutionCompleted ¶
func (h *Handler) RecordChildExecutionCompleted( ctx context.Context, request *hist.RecordChildExecutionCompletedRequest, ) (retError error)
RecordChildExecutionCompleted is used for reporting the completion of child workflow execution to parent. This is mainly called by transfer queue processor during the processing of DeleteExecution task.
func (*Handler) RecordDecisionTaskStarted ¶
func (h *Handler) RecordDecisionTaskStarted( ctx context.Context, recordRequest *hist.RecordDecisionTaskStartedRequest, ) (resp *hist.RecordDecisionTaskStartedResponse, retError error)
RecordDecisionTaskStarted - Record Decision Task started.
func (*Handler) RefreshWorkflowTasks ¶ added in v0.12.0
func (h *Handler) RefreshWorkflowTasks( ctx context.Context, request *hist.RefreshWorkflowTasksRequest) (retError error)
RefreshWorkflowTasks refreshes all the tasks of a workflow
func (*Handler) RegisterHandler ¶ added in v0.5.8
func (h *Handler) RegisterHandler()
RegisterHandler register this handler, must be called before Start()
func (*Handler) RemoveSignalMutableState ¶ added in v0.3.6
func (h *Handler) RemoveSignalMutableState( ctx context.Context, wrappedRequest *hist.RemoveSignalMutableStateRequest, ) (retError error)
RemoveSignalMutableState is used to remove a signal request ID that was previously recorded. This is currently used to clean execution info when signal decision finished.
func (*Handler) RemoveTask ¶ added in v0.9.0
func (h *Handler) RemoveTask( ctx context.Context, request *gen.RemoveTaskRequest, ) (retError error)
RemoveTask returns information about the internal states of a history host
func (*Handler) ReplicateEvents ¶ added in v0.3.11
func (h *Handler) ReplicateEvents( ctx context.Context, replicateRequest *hist.ReplicateEventsRequest, ) (retError error)
ReplicateEvents is called by processor to replicate history events for passive domains
func (*Handler) ReplicateEventsV2 ¶ added in v0.9.3
func (h *Handler) ReplicateEventsV2( ctx context.Context, replicateRequest *hist.ReplicateEventsV2Request, ) (retError error)
ReplicateEventsV2 is called by processor to replicate history events for passive domains
func (*Handler) ReplicateRawEvents ¶ added in v0.5.0
func (h *Handler) ReplicateRawEvents( ctx context.Context, replicateRequest *hist.ReplicateRawEventsRequest, ) (retError error)
ReplicateRawEvents is called by processor to replicate history raw events for passive domains
func (*Handler) RequestCancelWorkflowExecution ¶
func (h *Handler) RequestCancelWorkflowExecution( ctx context.Context, request *hist.RequestCancelWorkflowExecutionRequest, ) (retError error)
RequestCancelWorkflowExecution - requests cancellation of a workflow
func (*Handler) ResetStickyTaskList ¶ added in v0.3.7
func (h *Handler) ResetStickyTaskList( ctx context.Context, resetRequest *hist.ResetStickyTaskListRequest, ) (resp *hist.ResetStickyTaskListResponse, retError error)
ResetStickyTaskList reset the volatile information in mutable state of a given workflow. Volatile information are the information related to client, such as: 1. StickyTaskList 2. StickyScheduleToStartTimeout 3. ClientLibraryVersion 4. ClientFeatureVersion 5. ClientImpl
func (*Handler) ResetWorkflowExecution ¶ added in v0.5.2
func (h *Handler) ResetWorkflowExecution( ctx context.Context, wrappedRequest *hist.ResetWorkflowExecutionRequest, ) (resp *gen.ResetWorkflowExecutionResponse, retError error)
ResetWorkflowExecution reset an existing workflow execution in the history and immediately terminating the execution instance.
func (*Handler) RespondActivityTaskCanceled ¶
func (h *Handler) RespondActivityTaskCanceled( ctx context.Context, wrappedRequest *hist.RespondActivityTaskCanceledRequest, ) (retError error)
RespondActivityTaskCanceled - records failure of an activity task
func (*Handler) RespondActivityTaskCompleted ¶
func (h *Handler) RespondActivityTaskCompleted( ctx context.Context, wrappedRequest *hist.RespondActivityTaskCompletedRequest, ) (retError error)
RespondActivityTaskCompleted - records completion of an activity task
func (*Handler) RespondActivityTaskFailed ¶
func (h *Handler) RespondActivityTaskFailed( ctx context.Context, wrappedRequest *hist.RespondActivityTaskFailedRequest, ) (retError error)
RespondActivityTaskFailed - records failure of an activity task
func (*Handler) RespondDecisionTaskCompleted ¶
func (h *Handler) RespondDecisionTaskCompleted( ctx context.Context, wrappedRequest *hist.RespondDecisionTaskCompletedRequest, ) (resp *hist.RespondDecisionTaskCompletedResponse, retError error)
RespondDecisionTaskCompleted - records completion of a decision task
func (*Handler) RespondDecisionTaskFailed ¶ added in v0.3.3
func (h *Handler) RespondDecisionTaskFailed( ctx context.Context, wrappedRequest *hist.RespondDecisionTaskFailedRequest, ) (retError error)
RespondDecisionTaskFailed - failed response to decision task
func (*Handler) ScheduleDecisionTask ¶
func (h *Handler) ScheduleDecisionTask( ctx context.Context, request *hist.ScheduleDecisionTaskRequest, ) (retError error)
ScheduleDecisionTask is used for creating a decision task for already started workflow execution. This is mainly used by transfer queue processor during the processing of StartChildWorkflowExecution task, where it first starts child execution without creating the decision task and then calls this API after updating the mutable state of parent execution.
func (*Handler) SignalWithStartWorkflowExecution ¶ added in v0.3.11
func (h *Handler) SignalWithStartWorkflowExecution( ctx context.Context, wrappedRequest *hist.SignalWithStartWorkflowExecutionRequest, ) (resp *gen.StartWorkflowExecutionResponse, retError error)
SignalWithStartWorkflowExecution is used to ensure sending a signal event to a workflow execution. If workflow is running, this results in WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution. If workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled event recorded in history, and a decision task being created for the execution
func (*Handler) SignalWorkflowExecution ¶
func (h *Handler) SignalWorkflowExecution( ctx context.Context, wrappedRequest *hist.SignalWorkflowExecutionRequest, ) (retError error)
SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in WorkflowExecutionSignaled event recorded in the history and a decision task being created for the execution.
func (*Handler) StartWorkflowExecution ¶
func (h *Handler) StartWorkflowExecution( ctx context.Context, wrappedRequest *hist.StartWorkflowExecutionRequest, ) (resp *gen.StartWorkflowExecutionResponse, retError error)
StartWorkflowExecution - creates a new workflow execution
func (*Handler) SyncActivity ¶ added in v0.4.0
func (h *Handler) SyncActivity( ctx context.Context, syncActivityRequest *hist.SyncActivityRequest, ) (retError error)
SyncActivity is called by processor to sync activity
func (*Handler) SyncShardStatus ¶ added in v0.3.14
func (h *Handler) SyncShardStatus( ctx context.Context, syncShardStatusRequest *hist.SyncShardStatusRequest, ) (retError error)
SyncShardStatus is called by processor to sync history shard information from another cluster
func (*Handler) TerminateWorkflowExecution ¶
func (h *Handler) TerminateWorkflowExecution( ctx context.Context, wrappedRequest *hist.TerminateWorkflowExecutionRequest, ) (retError error)
TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.
type LocalTimerGate ¶ added in v0.3.11
type LocalTimerGate interface { TimerGate }
LocalTimerGate interface
func NewLocalTimerGate ¶ added in v0.3.11
func NewLocalTimerGate(timeSource clock.TimeSource) LocalTimerGate
NewLocalTimerGate create a new timer gate instance
type LocalTimerGateImpl ¶ added in v0.3.11
type LocalTimerGateImpl struct {
// contains filtered or unexported fields
}
LocalTimerGateImpl is an timer implementation, which basically is an wrapper of golang's timer and additional feature
func (*LocalTimerGateImpl) Close ¶ added in v0.3.11
func (timerGate *LocalTimerGateImpl) Close()
Close shutdown the timer
func (*LocalTimerGateImpl) FireAfter ¶ added in v0.3.11
func (timerGate *LocalTimerGateImpl) FireAfter(now time.Time) bool
FireAfter check will the timer get fired after a certain time
func (*LocalTimerGateImpl) FireChan ¶ added in v0.3.11
func (timerGate *LocalTimerGateImpl) FireChan() <-chan struct{}
FireChan return the channel which will be fired when time is up
type MockProcessor ¶ added in v0.3.12
MockProcessor is used as mock implementation for Processor
type MockQueueAckMgr ¶ added in v0.3.12
MockQueueAckMgr is used as mock implementation for QueueAckMgr
type MockReplicatorQueueProcessor ¶ added in v0.9.0
type MockReplicatorQueueProcessor struct {
// contains filtered or unexported fields
}
MockReplicatorQueueProcessor is a mock of ReplicatorQueueProcessor interface
func NewMockReplicatorQueueProcessor ¶ added in v0.9.0
func NewMockReplicatorQueueProcessor(ctrl *gomock.Controller) *MockReplicatorQueueProcessor
NewMockReplicatorQueueProcessor creates a new mock instance
func (*MockReplicatorQueueProcessor) EXPECT ¶ added in v0.9.0
func (m *MockReplicatorQueueProcessor) EXPECT() *MockReplicatorQueueProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MockReplicatorQueueProcessor) Start ¶ added in v0.9.0
func (m *MockReplicatorQueueProcessor) Start()
Start mocks base method
func (*MockReplicatorQueueProcessor) Stop ¶ added in v0.9.0
func (m *MockReplicatorQueueProcessor) Stop()
Stop mocks base method
type MockReplicatorQueueProcessorMockRecorder ¶ added in v0.9.0
type MockReplicatorQueueProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MockReplicatorQueueProcessorMockRecorder is the mock recorder for MockReplicatorQueueProcessor
func (*MockReplicatorQueueProcessorMockRecorder) Start ¶ added in v0.9.0
func (mr *MockReplicatorQueueProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MockReplicatorQueueProcessorMockRecorder) Stop ¶ added in v0.9.0
func (mr *MockReplicatorQueueProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
type MockTimerProcessor ¶ added in v0.4.0
MockTimerProcessor is used as mock implementation for timerProcessor
type MockTimerQueueAckMgr ¶ added in v0.3.11
MockTimerQueueAckMgr is used as mock implementation for TimerQueueAckMgr
type MockconflictResolver ¶ added in v0.11.0
type MockconflictResolver struct {
// contains filtered or unexported fields
}
MockconflictResolver is a mock of conflictResolver interface
func NewMockconflictResolver ¶ added in v0.11.0
func NewMockconflictResolver(ctrl *gomock.Controller) *MockconflictResolver
NewMockconflictResolver creates a new mock instance
func (*MockconflictResolver) EXPECT ¶ added in v0.11.0
func (m *MockconflictResolver) EXPECT() *MockconflictResolverMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
type MockconflictResolverMockRecorder ¶ added in v0.11.0
type MockconflictResolverMockRecorder struct {
// contains filtered or unexported fields
}
MockconflictResolverMockRecorder is the mock recorder for MockconflictResolver
type MocktimerQueueProcessor ¶ added in v0.11.0
type MocktimerQueueProcessor struct {
// contains filtered or unexported fields
}
MocktimerQueueProcessor is a mock of timerQueueProcessor interface
func NewMocktimerQueueProcessor ¶ added in v0.11.0
func NewMocktimerQueueProcessor(ctrl *gomock.Controller) *MocktimerQueueProcessor
NewMocktimerQueueProcessor creates a new mock instance
func (*MocktimerQueueProcessor) EXPECT ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) EXPECT() *MocktimerQueueProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MocktimerQueueProcessor) FailoverDomain ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) FailoverDomain(domainIDs map[string]struct{})
FailoverDomain mocks base method
func (*MocktimerQueueProcessor) LockTaskProcessing ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) LockTaskProcessing()
LockTaskProcessing mocks base method
func (*MocktimerQueueProcessor) NotifyNewTimers ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) NotifyNewTimers(clusterName string, timerTask []persistence.Task)
NotifyNewTimers mocks base method
func (*MocktimerQueueProcessor) Start ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) Start()
Start mocks base method
func (*MocktimerQueueProcessor) Stop ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) Stop()
Stop mocks base method
func (*MocktimerQueueProcessor) UnlockTaskProcessing ¶ added in v0.11.0
func (m *MocktimerQueueProcessor) UnlockTaskProcessing()
UnlockTaskProcessing mocks base method
type MocktimerQueueProcessorMockRecorder ¶ added in v0.11.0
type MocktimerQueueProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MocktimerQueueProcessorMockRecorder is the mock recorder for MocktimerQueueProcessor
func (*MocktimerQueueProcessorMockRecorder) FailoverDomain ¶ added in v0.11.0
func (mr *MocktimerQueueProcessorMockRecorder) FailoverDomain(domainIDs interface{}) *gomock.Call
FailoverDomain indicates an expected call of FailoverDomain
func (*MocktimerQueueProcessorMockRecorder) LockTaskProcessing ¶ added in v0.11.0
func (mr *MocktimerQueueProcessorMockRecorder) LockTaskProcessing() *gomock.Call
LockTaskProcessing indicates an expected call of LockTaskProcessing
func (*MocktimerQueueProcessorMockRecorder) NotifyNewTimers ¶ added in v0.11.0
func (mr *MocktimerQueueProcessorMockRecorder) NotifyNewTimers(clusterName, timerTask interface{}) *gomock.Call
NotifyNewTimers indicates an expected call of NotifyNewTimers
func (*MocktimerQueueProcessorMockRecorder) Start ¶ added in v0.11.0
func (mr *MocktimerQueueProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MocktimerQueueProcessorMockRecorder) Stop ¶ added in v0.11.0
func (mr *MocktimerQueueProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MocktimerQueueProcessorMockRecorder) UnlockTaskProcessing ¶ added in v0.11.0
func (mr *MocktimerQueueProcessorMockRecorder) UnlockTaskProcessing() *gomock.Call
UnlockTaskProcessing indicates an expected call of UnlockTaskProcessing
type MocktransferQueueProcessor ¶ added in v0.11.0
type MocktransferQueueProcessor struct {
// contains filtered or unexported fields
}
MocktransferQueueProcessor is a mock of transferQueueProcessor interface
func NewMocktransferQueueProcessor ¶ added in v0.11.0
func NewMocktransferQueueProcessor(ctrl *gomock.Controller) *MocktransferQueueProcessor
NewMocktransferQueueProcessor creates a new mock instance
func (*MocktransferQueueProcessor) EXPECT ¶ added in v0.11.0
func (m *MocktransferQueueProcessor) EXPECT() *MocktransferQueueProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use
func (*MocktransferQueueProcessor) FailoverDomain ¶ added in v0.11.0
func (m *MocktransferQueueProcessor) FailoverDomain(domainIDs map[string]struct{})
FailoverDomain mocks base method
func (*MocktransferQueueProcessor) LockTaskProcessing ¶ added in v0.11.0
func (m *MocktransferQueueProcessor) LockTaskProcessing()
LockTaskProcessing mocks base method
func (*MocktransferQueueProcessor) NotifyNewTask ¶ added in v0.11.0
func (m *MocktransferQueueProcessor) NotifyNewTask(clusterName string, transferTasks []persistence.Task)
NotifyNewTask mocks base method
func (*MocktransferQueueProcessor) Start ¶ added in v0.11.0
func (m *MocktransferQueueProcessor) Start()
Start mocks base method
func (*MocktransferQueueProcessor) Stop ¶ added in v0.11.0
func (m *MocktransferQueueProcessor) Stop()
Stop mocks base method
func (*MocktransferQueueProcessor) UnlockTaskProcessing ¶ added in v0.13.0
func (m *MocktransferQueueProcessor) UnlockTaskProcessing()
UnlockTaskProcessing mocks base method
type MocktransferQueueProcessorMockRecorder ¶ added in v0.11.0
type MocktransferQueueProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MocktransferQueueProcessorMockRecorder is the mock recorder for MocktransferQueueProcessor
func (*MocktransferQueueProcessorMockRecorder) FailoverDomain ¶ added in v0.11.0
func (mr *MocktransferQueueProcessorMockRecorder) FailoverDomain(domainIDs interface{}) *gomock.Call
FailoverDomain indicates an expected call of FailoverDomain
func (*MocktransferQueueProcessorMockRecorder) LockTaskProcessing ¶ added in v0.11.0
func (mr *MocktransferQueueProcessorMockRecorder) LockTaskProcessing() *gomock.Call
LockTaskProcessing indicates an expected call of LockTaskProcessing
func (*MocktransferQueueProcessorMockRecorder) NotifyNewTask ¶ added in v0.11.0
func (mr *MocktransferQueueProcessorMockRecorder) NotifyNewTask(clusterName, transferTasks interface{}) *gomock.Call
NotifyNewTask indicates an expected call of NotifyNewTask
func (*MocktransferQueueProcessorMockRecorder) Start ¶ added in v0.11.0
func (mr *MocktransferQueueProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start
func (*MocktransferQueueProcessorMockRecorder) Stop ¶ added in v0.11.0
func (mr *MocktransferQueueProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop
func (*MocktransferQueueProcessorMockRecorder) UnlockTaskProcessing ¶ added in v0.13.0
func (mr *MocktransferQueueProcessorMockRecorder) UnlockTaskProcessing() *gomock.Call
UnlockTaskProcessing indicates an expected call of UnlockTaskProcessing
type QueueProcessorOptions ¶ added in v0.3.11
type QueueProcessorOptions struct { BatchSize dynamicconfig.IntPropertyFn WorkerCount dynamicconfig.IntPropertyFn MaxPollRPS dynamicconfig.IntPropertyFn MaxPollInterval dynamicconfig.DurationPropertyFn MaxPollIntervalJitterCoefficient dynamicconfig.FloatPropertyFn UpdateAckInterval dynamicconfig.DurationPropertyFn UpdateAckIntervalJitterCoefficient dynamicconfig.FloatPropertyFn MaxRetryCount dynamicconfig.IntPropertyFn RedispatchInterval dynamicconfig.DurationPropertyFn RedispatchIntervalJitterCoefficient dynamicconfig.FloatPropertyFn MaxRedispatchQueueSize dynamicconfig.IntPropertyFn EnablePriorityTaskProcessor dynamicconfig.BoolPropertyFn MetricScope int QueueType task.QueueType }
QueueProcessorOptions is options passed to queue processor implementation
type RemoteTimerGate ¶ added in v0.3.11
type RemoteTimerGate interface { TimerGate // SetCurrentTime set the current time, and additionally fire the fire chan // if new "current" time is after the next wake up time, return true if // "current" is actually updated SetCurrentTime(nextTime time.Time) bool }
RemoteTimerGate interface
func NewRemoteTimerGate ¶ added in v0.3.11
func NewRemoteTimerGate() RemoteTimerGate
NewRemoteTimerGate create a new timer gate instance
type RemoteTimerGateImpl ¶ added in v0.3.11
type RemoteTimerGateImpl struct { // lock for timer and next wake up time sync.Mutex // contains filtered or unexported fields }
RemoteTimerGateImpl is an timer implementation, which basically is an wrapper of golang's timer and additional feature
func (*RemoteTimerGateImpl) Close ¶ added in v0.5.0
func (timerGate *RemoteTimerGateImpl) Close()
Close shutdown the timer
func (*RemoteTimerGateImpl) FireAfter ¶ added in v0.3.11
func (timerGate *RemoteTimerGateImpl) FireAfter(now time.Time) bool
FireAfter check will the timer get fired after a certain time
func (*RemoteTimerGateImpl) FireChan ¶ added in v0.3.11
func (timerGate *RemoteTimerGateImpl) FireChan() <-chan struct{}
FireChan return the channel which will be fired when time is up
func (*RemoteTimerGateImpl) SetCurrentTime ¶ added in v0.3.11
func (timerGate *RemoteTimerGateImpl) SetCurrentTime(currentTime time.Time) bool
SetCurrentTime set the current time, and additionally fire the fire chan if new "current" time is after the next wake up time, return true if "current" is actually updated
type ReplicatorQueueProcessor ¶ added in v0.9.0
type ReplicatorQueueProcessor interface {
// contains filtered or unexported methods
}
ReplicatorQueueProcessor is the interface for replicator queue processor
type TimerGate ¶ added in v0.3.11
type TimerGate interface { // FireChan return the channel which will be fired when time is up FireChan() <-chan struct{} // FireAfter check will the timer get fired after a certain time FireAfter(now time.Time) bool // Update update the timer gate, return true if update is a success // success means timer is idle or timer is set with a sooner time to fire Update(nextTime time.Time) bool // Close shutdown the timer Close() }
TimerGate interface
Source Files ¶
- MockProcessor.go
- MockQueueAckMgr.go
- MockTimerProcessor.go
- MockTimerQueueAckMgr.go
- conflictResolver.go
- conflictResolver_mock.go
- decisionChecker.go
- decisionHandler.go
- decisionTaskHandler.go
- handler.go
- historyEngine.go
- historyEngineInterfaces.go
- historyReplicator.go
- queueAckMgr.go
- queueProcessor.go
- replicatorQueueProcessor.go
- replicatorQueueProcessor_mock.go
- service.go
- taskAllocator.go
- taskProcessor.go
- timerGate.go
- timerQueueAckMgr.go
- timerQueueActiveProcessor.go
- timerQueueProcessor.go
- timerQueueProcessorBase.go
- timerQueueProcessor_mock.go
- timerQueueStandbyProcessor.go
- transferQueueActiveProcessor.go
- transferQueueProcessor.go
- transferQueueProcessorBase.go
- transferQueueProcessor_mock.go
- transferQueueStandbyProcessor.go
- workflowExecutionUtil.go
- workflowResetor.go
Directories ¶
Path | Synopsis |
---|---|
Package engine is a generated GoMock package.
|
Package engine is a generated GoMock package. |
Package events is a generated GoMock package.
|
Package events is a generated GoMock package. |
Package execution is a generated GoMock package.
|
Package execution is a generated GoMock package. |
Package ndc is a generated GoMock package.
|
Package ndc is a generated GoMock package. |
Package queue is a generated GoMock package.
|
Package queue is a generated GoMock package. |
Package replication is a generated GoMock package.
|
Package replication is a generated GoMock package. |
Package reset is a generated GoMock package.
|
Package reset is a generated GoMock package. |
Package shard is a generated GoMock package.
|
Package shard is a generated GoMock package. |
Package task is a generated GoMock package.
|
Package task is a generated GoMock package. |