Documentation ¶
Overview ¶
Package task is a generated GoMock package.
Index ¶
- Variables
- func GetTimerTaskMetricScope(taskType int, isActive bool) int
- func GetTransferTaskMetricsScope(taskType int, isActive bool) int
- func InitializeLoggerForTask(shardID int, task Info, logger log.Logger) log.Logger
- func NewCrossClusterTaskProcessors(shard shard.Context, taskProcessor Processor, taskFetchers Fetchers, ...) common.Daemon
- func NewMockTaskMatcher(mockTask *MockTask) gomock.Matcher
- type CrossClusterTask
- type CrossClusterTaskProcessorOptions
- type Executor
- func NewCrossClusterSourceTaskExecutor(shard shard.Context, executionCache *execution.Cache, logger log.Logger) Executor
- func NewCrossClusterTargetTaskExecutor(shard shard.Context, logger log.Logger, config *config.Config) Executor
- func NewTimerActiveTaskExecutor(shard shard.Context, archiverClient archiver.Client, ...) Executor
- func NewTimerStandbyTaskExecutor(shard shard.Context, archiverClient archiver.Client, ...) Executor
- func NewTransferActiveTaskExecutor(shard shard.Context, archiverClient archiver.Client, ...) Executor
- func NewTransferStandbyTaskExecutor(shard shard.Context, archiverClient archiver.Client, ...) Executor
- type Fetcher
- type FetcherOptions
- type Fetchers
- type Filter
- type Info
- type Initializer
- type Key
- type MockCrossClusterTask
- func (m *MockCrossClusterTask) Ack()
- func (m *MockCrossClusterTask) EXPECT() *MockCrossClusterTaskMockRecorder
- func (m *MockCrossClusterTask) Execute() error
- func (m *MockCrossClusterTask) GetAttempt() int
- func (m *MockCrossClusterTask) GetCrossClusterRequest() (*types.CrossClusterTaskRequest, error)
- func (m *MockCrossClusterTask) GetDomainID() string
- func (m *MockCrossClusterTask) GetInfo() Info
- func (m *MockCrossClusterTask) GetQueueType() QueueType
- func (m *MockCrossClusterTask) GetRunID() string
- func (m *MockCrossClusterTask) GetShard() shard.Context
- func (m *MockCrossClusterTask) GetTaskID() int64
- func (m *MockCrossClusterTask) GetTaskType() int
- func (m *MockCrossClusterTask) GetVersion() int64
- func (m *MockCrossClusterTask) GetVisibilityTimestamp() time.Time
- func (m *MockCrossClusterTask) GetWorkflowID() string
- func (m *MockCrossClusterTask) HandleErr(err error) error
- func (m *MockCrossClusterTask) IsReadyForPoll() bool
- func (m *MockCrossClusterTask) IsValid() bool
- func (m *MockCrossClusterTask) Nack()
- func (m *MockCrossClusterTask) Priority() int
- func (m *MockCrossClusterTask) RecordResponse(arg0 *types.CrossClusterTaskResponse) error
- func (m *MockCrossClusterTask) RetryErr(err error) bool
- func (m *MockCrossClusterTask) SetPriority(arg0 int)
- func (m *MockCrossClusterTask) State() task.State
- type MockCrossClusterTaskMockRecorder
- func (mr *MockCrossClusterTaskMockRecorder) Ack() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) Execute() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetAttempt() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetCrossClusterRequest() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetDomainID() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetInfo() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetQueueType() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetRunID() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetShard() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetTaskID() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetTaskType() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetVersion() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetVisibilityTimestamp() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) GetWorkflowID() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) HandleErr(err interface{}) *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) IsReadyForPoll() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) IsValid() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) Nack() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) Priority() *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) RecordResponse(arg0 interface{}) *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) RetryErr(err interface{}) *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) SetPriority(arg0 interface{}) *gomock.Call
- func (mr *MockCrossClusterTaskMockRecorder) State() *gomock.Call
- type MockExecutor
- type MockExecutorMockRecorder
- type MockFetcher
- type MockFetcherMockRecorder
- type MockInfo
- func (m *MockInfo) EXPECT() *MockInfoMockRecorder
- func (m *MockInfo) GetDomainID() string
- func (m *MockInfo) GetRunID() string
- func (m *MockInfo) GetTaskID() int64
- func (m *MockInfo) GetTaskType() int
- func (m *MockInfo) GetVersion() int64
- func (m *MockInfo) GetVisibilityTimestamp() time.Time
- func (m *MockInfo) GetWorkflowID() string
- type MockInfoMockRecorder
- func (mr *MockInfoMockRecorder) GetDomainID() *gomock.Call
- func (mr *MockInfoMockRecorder) GetRunID() *gomock.Call
- func (mr *MockInfoMockRecorder) GetTaskID() *gomock.Call
- func (mr *MockInfoMockRecorder) GetTaskType() *gomock.Call
- func (mr *MockInfoMockRecorder) GetVersion() *gomock.Call
- func (mr *MockInfoMockRecorder) GetVisibilityTimestamp() *gomock.Call
- func (mr *MockInfoMockRecorder) GetWorkflowID() *gomock.Call
- type MockKey
- type MockKeyMockRecorder
- type MockPriorityAssigner
- type MockPriorityAssignerMockRecorder
- type MockProcessor
- type MockProcessorMockRecorder
- func (mr *MockProcessorMockRecorder) Start() *gomock.Call
- func (mr *MockProcessorMockRecorder) Stop() *gomock.Call
- func (mr *MockProcessorMockRecorder) StopShardProcessor(arg0 interface{}) *gomock.Call
- func (mr *MockProcessorMockRecorder) Submit(arg0 interface{}) *gomock.Call
- func (mr *MockProcessorMockRecorder) TrySubmit(arg0 interface{}) *gomock.Call
- type MockRedispatcher
- type MockRedispatcherMockRecorder
- func (mr *MockRedispatcherMockRecorder) AddTask(arg0 interface{}) *gomock.Call
- func (mr *MockRedispatcherMockRecorder) Redispatch(targetSize interface{}) *gomock.Call
- func (mr *MockRedispatcherMockRecorder) Size() *gomock.Call
- func (mr *MockRedispatcherMockRecorder) Start() *gomock.Call
- func (mr *MockRedispatcherMockRecorder) Stop() *gomock.Call
- type MockTask
- func (m *MockTask) Ack()
- func (m *MockTask) EXPECT() *MockTaskMockRecorder
- func (m *MockTask) Execute() error
- func (m *MockTask) GetAttempt() int
- func (m *MockTask) GetDomainID() string
- func (m *MockTask) GetInfo() Info
- func (m *MockTask) GetQueueType() QueueType
- func (m *MockTask) GetRunID() string
- func (m *MockTask) GetShard() shard.Context
- func (m *MockTask) GetTaskID() int64
- func (m *MockTask) GetTaskType() int
- func (m *MockTask) GetVersion() int64
- func (m *MockTask) GetVisibilityTimestamp() time.Time
- func (m *MockTask) GetWorkflowID() string
- func (m *MockTask) HandleErr(err error) error
- func (m *MockTask) Nack()
- func (m *MockTask) Priority() int
- func (m *MockTask) RetryErr(err error) bool
- func (m *MockTask) SetPriority(arg0 int)
- func (m *MockTask) State() task.State
- type MockTaskMockRecorder
- func (mr *MockTaskMockRecorder) Ack() *gomock.Call
- func (mr *MockTaskMockRecorder) Execute() *gomock.Call
- func (mr *MockTaskMockRecorder) GetAttempt() *gomock.Call
- func (mr *MockTaskMockRecorder) GetDomainID() *gomock.Call
- func (mr *MockTaskMockRecorder) GetInfo() *gomock.Call
- func (mr *MockTaskMockRecorder) GetQueueType() *gomock.Call
- func (mr *MockTaskMockRecorder) GetRunID() *gomock.Call
- func (mr *MockTaskMockRecorder) GetShard() *gomock.Call
- func (mr *MockTaskMockRecorder) GetTaskID() *gomock.Call
- func (mr *MockTaskMockRecorder) GetTaskType() *gomock.Call
- func (mr *MockTaskMockRecorder) GetVersion() *gomock.Call
- func (mr *MockTaskMockRecorder) GetVisibilityTimestamp() *gomock.Call
- func (mr *MockTaskMockRecorder) GetWorkflowID() *gomock.Call
- func (mr *MockTaskMockRecorder) HandleErr(err interface{}) *gomock.Call
- func (mr *MockTaskMockRecorder) Nack() *gomock.Call
- func (mr *MockTaskMockRecorder) Priority() *gomock.Call
- func (mr *MockTaskMockRecorder) RetryErr(err interface{}) *gomock.Call
- func (mr *MockTaskMockRecorder) SetPriority(arg0 interface{}) *gomock.Call
- func (mr *MockTaskMockRecorder) State() *gomock.Call
- type PriorityAssigner
- type Processor
- type QueueType
- type Redispatcher
- type RedispatcherOptions
- type Task
- func NewCrossClusterTargetTask(shard shard.Context, taskRequest *types.CrossClusterTaskRequest, ...) (Task, future.Future)
- func NewTimerTask(shard shard.Context, taskInfo Info, queueType QueueType, logger log.Logger, ...) Task
- func NewTransferTask(shard shard.Context, taskInfo Info, queueType QueueType, logger log.Logger, ...) Task
Constants ¶
This section is empty.
Variables ¶
var ( // ErrTaskDiscarded is the error indicating that the timer / transfer task is pending for too long and discarded. ErrTaskDiscarded = errors.New("passive task pending for too long") // ErrTaskPendingActive is the error indicating that the task should be re-dispatched ErrTaskPendingActive = errors.New("redispatch the task while the domain is pending-active") )
var ( // ErrMissingRequestCancelInfo indicates missing request cancel info ErrMissingRequestCancelInfo = &types.InternalServiceError{Message: "unable to get request cancel info"} // ErrMissingSignalInfo indicates missing signal external ErrMissingSignalInfo = &types.InternalServiceError{Message: "unable to get signal info"} )
Functions ¶
func GetTimerTaskMetricScope ¶ added in v0.14.0
GetTimerTaskMetricScope returns the metrics scope index for timer task
func GetTransferTaskMetricsScope ¶ added in v0.14.0
GetTransferTaskMetricsScope returns the metrics scope index for transfer task
func InitializeLoggerForTask ¶ added in v0.14.0
InitializeLoggerForTask creates a new logger with additional tags for task info
func NewCrossClusterTaskProcessors ¶ added in v0.23.1
func NewCrossClusterTaskProcessors( shard shard.Context, taskProcessor Processor, taskFetchers Fetchers, options *CrossClusterTaskProcessorOptions, ) common.Daemon
NewCrossClusterTaskProcessors creates a list of crossClusterTaskProcessors for processing cross cluster tasks at target cluster. One processor per source cluster per shard
func NewMockTaskMatcher ¶ added in v0.14.0
NewMockTaskMatcher creates a gomock matcher for mock Task
Types ¶
type CrossClusterTask ¶ added in v0.22.0
type CrossClusterTask interface { Task IsValid() bool IsReadyForPoll() bool GetCrossClusterRequest() (*types.CrossClusterTaskRequest, error) RecordResponse(*types.CrossClusterTaskResponse) error }
CrossClusterTask is the interface for processing cross cluster task in the source cluster
func NewCrossClusterSourceTask ¶ added in v0.23.1
func NewCrossClusterSourceTask( shard shard.Context, targetCluster string, executionCache *execution.Cache, taskInfo Info, taskExecutor Executor, taskProcessor Processor, logger log.Logger, redispatchFn func(task Task), readyForPollFn func(task CrossClusterTask), maxRetryCount dynamicconfig.IntPropertyFn, ) CrossClusterTask
NewCrossClusterSourceTask creates a cross cluster task for the processing it at the source cluster
type CrossClusterTaskProcessorOptions ¶ added in v0.23.1
type CrossClusterTaskProcessorOptions struct { Enabled dynamicconfig.BoolPropertyFn MaxPendingTasks dynamicconfig.IntPropertyFn TaskMaxRetryCount dynamicconfig.IntPropertyFn TaskRedispatchInterval dynamicconfig.DurationPropertyFn TaskWaitInterval dynamicconfig.DurationPropertyFn ServiceBusyBackoffInterval dynamicconfig.DurationPropertyFn TimerJitterCoefficient dynamicconfig.FloatPropertyFn }
CrossClusterTaskProcessorOptions configures crossClusterTaskProcessor
type Executor ¶
Executor contains the execution logic for Task
func NewCrossClusterSourceTaskExecutor ¶ added in v0.24.0
func NewCrossClusterTargetTaskExecutor ¶ added in v0.23.1
func NewCrossClusterTargetTaskExecutor( shard shard.Context, logger log.Logger, config *config.Config, ) Executor
NewCrossClusterTargetTaskExecutor creates a new task Executor for processing cross cluster tasks at target cluster
func NewTimerActiveTaskExecutor ¶
func NewTimerActiveTaskExecutor( shard shard.Context, archiverClient archiver.Client, executionCache *execution.Cache, logger log.Logger, metricsClient metrics.Client, config *config.Config, ) Executor
NewTimerActiveTaskExecutor creates a new task executor for active timer task
func NewTimerStandbyTaskExecutor ¶
func NewTimerStandbyTaskExecutor( shard shard.Context, archiverClient archiver.Client, executionCache *execution.Cache, historyResender ndc.HistoryResender, logger log.Logger, metricsClient metrics.Client, clusterName string, config *config.Config, ) Executor
NewTimerStandbyTaskExecutor creates a new task executor for standby timer task
func NewTransferActiveTaskExecutor ¶
func NewTransferActiveTaskExecutor( shard shard.Context, archiverClient archiver.Client, executionCache *execution.Cache, workflowResetter reset.WorkflowResetter, logger log.Logger, config *config.Config, ) Executor
NewTransferActiveTaskExecutor creates a new task executor for active transfer task
func NewTransferStandbyTaskExecutor ¶
func NewTransferStandbyTaskExecutor( shard shard.Context, archiverClient archiver.Client, executionCache *execution.Cache, historyResender ndc.HistoryResender, logger log.Logger, clusterName string, config *config.Config, ) Executor
NewTransferStandbyTaskExecutor creates a new task executor for standby transfer task
type Fetcher ¶ added in v0.22.0
type Fetcher interface { common.Daemon GetSourceCluster() string Fetch(shardID int, fetchParams ...interface{}) future.Future }
Fetcher is a host level component for aggregating task fetch requests from all shards on the host and perform one fetching operation for aggregated requests.
type FetcherOptions ¶ added in v0.22.0
type FetcherOptions struct { Parallelism dynamicconfig.IntPropertyFn AggregationInterval dynamicconfig.DurationPropertyFn ServiceBusyBackoffInterval dynamicconfig.DurationPropertyFn ErrorRetryInterval dynamicconfig.DurationPropertyFn TimerJitterCoefficient dynamicconfig.FloatPropertyFn }
FetcherOptions configures a Fetcher
type Fetchers ¶ added in v0.22.0
type Fetchers []Fetcher
Fetchers is a group of Fetchers, one for each source cluster
func NewCrossClusterTaskFetchers ¶ added in v0.22.0
func NewCrossClusterTaskFetchers( clusterMetadata cluster.Metadata, clientBean client.Bean, options *FetcherOptions, metricsClient metrics.Client, logger log.Logger, ) Fetchers
NewCrossClusterTaskFetchers creates a set of task fetchers, one for each source cluster The future returned by Fetcher.Get() will have value type []*types.CrossClusterTaskRequest
type Info ¶
type Info interface { GetVersion() int64 GetTaskID() int64 GetTaskType() int GetVisibilityTimestamp() time.Time GetWorkflowID() string GetRunID() string GetDomainID() string }
Info contains the metadata for a task
type Initializer ¶ added in v0.14.0
Initializer initializes a Task based on the Info
type MockCrossClusterTask ¶ added in v0.23.1
type MockCrossClusterTask struct {
// contains filtered or unexported fields
}
MockCrossClusterTask is a mock of CrossClusterTask interface.
func NewMockCrossClusterTask ¶ added in v0.23.1
func NewMockCrossClusterTask(ctrl *gomock.Controller) *MockCrossClusterTask
NewMockCrossClusterTask creates a new mock instance.
func (*MockCrossClusterTask) Ack ¶ added in v0.23.1
func (m *MockCrossClusterTask) Ack()
Ack mocks base method.
func (*MockCrossClusterTask) EXPECT ¶ added in v0.23.1
func (m *MockCrossClusterTask) EXPECT() *MockCrossClusterTaskMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockCrossClusterTask) Execute ¶ added in v0.23.1
func (m *MockCrossClusterTask) Execute() error
Execute mocks base method.
func (*MockCrossClusterTask) GetAttempt ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetAttempt() int
GetAttempt mocks base method.
func (*MockCrossClusterTask) GetCrossClusterRequest ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetCrossClusterRequest() (*types.CrossClusterTaskRequest, error)
GetCrossClusterRequest mocks base method.
func (*MockCrossClusterTask) GetDomainID ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetDomainID() string
GetDomainID mocks base method.
func (*MockCrossClusterTask) GetInfo ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetInfo() Info
GetInfo mocks base method.
func (*MockCrossClusterTask) GetQueueType ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetQueueType() QueueType
GetQueueType mocks base method.
func (*MockCrossClusterTask) GetRunID ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetRunID() string
GetRunID mocks base method.
func (*MockCrossClusterTask) GetShard ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetShard() shard.Context
GetShard mocks base method.
func (*MockCrossClusterTask) GetTaskID ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetTaskID() int64
GetTaskID mocks base method.
func (*MockCrossClusterTask) GetTaskType ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetTaskType() int
GetTaskType mocks base method.
func (*MockCrossClusterTask) GetVersion ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetVersion() int64
GetVersion mocks base method.
func (*MockCrossClusterTask) GetVisibilityTimestamp ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetVisibilityTimestamp() time.Time
GetVisibilityTimestamp mocks base method.
func (*MockCrossClusterTask) GetWorkflowID ¶ added in v0.23.1
func (m *MockCrossClusterTask) GetWorkflowID() string
GetWorkflowID mocks base method.
func (*MockCrossClusterTask) HandleErr ¶ added in v0.23.1
func (m *MockCrossClusterTask) HandleErr(err error) error
HandleErr mocks base method.
func (*MockCrossClusterTask) IsReadyForPoll ¶ added in v0.23.1
func (m *MockCrossClusterTask) IsReadyForPoll() bool
IsReadyForPoll mocks base method.
func (*MockCrossClusterTask) IsValid ¶ added in v0.23.1
func (m *MockCrossClusterTask) IsValid() bool
IsValid mocks base method.
func (*MockCrossClusterTask) Nack ¶ added in v0.23.1
func (m *MockCrossClusterTask) Nack()
Nack mocks base method.
func (*MockCrossClusterTask) Priority ¶ added in v0.23.1
func (m *MockCrossClusterTask) Priority() int
Priority mocks base method.
func (*MockCrossClusterTask) RecordResponse ¶ added in v0.24.0
func (m *MockCrossClusterTask) RecordResponse(arg0 *types.CrossClusterTaskResponse) error
RecordResponse mocks base method.
func (*MockCrossClusterTask) RetryErr ¶ added in v0.23.1
func (m *MockCrossClusterTask) RetryErr(err error) bool
RetryErr mocks base method.
func (*MockCrossClusterTask) SetPriority ¶ added in v0.23.1
func (m *MockCrossClusterTask) SetPriority(arg0 int)
SetPriority mocks base method.
func (*MockCrossClusterTask) State ¶ added in v0.23.1
func (m *MockCrossClusterTask) State() task.State
State mocks base method.
type MockCrossClusterTaskMockRecorder ¶ added in v0.23.1
type MockCrossClusterTaskMockRecorder struct {
// contains filtered or unexported fields
}
MockCrossClusterTaskMockRecorder is the mock recorder for MockCrossClusterTask.
func (*MockCrossClusterTaskMockRecorder) Ack ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) Ack() *gomock.Call
Ack indicates an expected call of Ack.
func (*MockCrossClusterTaskMockRecorder) Execute ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) Execute() *gomock.Call
Execute indicates an expected call of Execute.
func (*MockCrossClusterTaskMockRecorder) GetAttempt ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetAttempt() *gomock.Call
GetAttempt indicates an expected call of GetAttempt.
func (*MockCrossClusterTaskMockRecorder) GetCrossClusterRequest ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetCrossClusterRequest() *gomock.Call
GetCrossClusterRequest indicates an expected call of GetCrossClusterRequest.
func (*MockCrossClusterTaskMockRecorder) GetDomainID ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetDomainID() *gomock.Call
GetDomainID indicates an expected call of GetDomainID.
func (*MockCrossClusterTaskMockRecorder) GetInfo ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetInfo() *gomock.Call
GetInfo indicates an expected call of GetInfo.
func (*MockCrossClusterTaskMockRecorder) GetQueueType ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetQueueType() *gomock.Call
GetQueueType indicates an expected call of GetQueueType.
func (*MockCrossClusterTaskMockRecorder) GetRunID ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetRunID() *gomock.Call
GetRunID indicates an expected call of GetRunID.
func (*MockCrossClusterTaskMockRecorder) GetShard ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetShard() *gomock.Call
GetShard indicates an expected call of GetShard.
func (*MockCrossClusterTaskMockRecorder) GetTaskID ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetTaskID() *gomock.Call
GetTaskID indicates an expected call of GetTaskID.
func (*MockCrossClusterTaskMockRecorder) GetTaskType ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetTaskType() *gomock.Call
GetTaskType indicates an expected call of GetTaskType.
func (*MockCrossClusterTaskMockRecorder) GetVersion ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetVersion() *gomock.Call
GetVersion indicates an expected call of GetVersion.
func (*MockCrossClusterTaskMockRecorder) GetVisibilityTimestamp ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetVisibilityTimestamp() *gomock.Call
GetVisibilityTimestamp indicates an expected call of GetVisibilityTimestamp.
func (*MockCrossClusterTaskMockRecorder) GetWorkflowID ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) GetWorkflowID() *gomock.Call
GetWorkflowID indicates an expected call of GetWorkflowID.
func (*MockCrossClusterTaskMockRecorder) HandleErr ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) HandleErr(err interface{}) *gomock.Call
HandleErr indicates an expected call of HandleErr.
func (*MockCrossClusterTaskMockRecorder) IsReadyForPoll ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) IsReadyForPoll() *gomock.Call
IsReadyForPoll indicates an expected call of IsReadyForPoll.
func (*MockCrossClusterTaskMockRecorder) IsValid ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) IsValid() *gomock.Call
IsValid indicates an expected call of IsValid.
func (*MockCrossClusterTaskMockRecorder) Nack ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) Nack() *gomock.Call
Nack indicates an expected call of Nack.
func (*MockCrossClusterTaskMockRecorder) Priority ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) Priority() *gomock.Call
Priority indicates an expected call of Priority.
func (*MockCrossClusterTaskMockRecorder) RecordResponse ¶ added in v0.24.0
func (mr *MockCrossClusterTaskMockRecorder) RecordResponse(arg0 interface{}) *gomock.Call
RecordResponse indicates an expected call of RecordResponse.
func (*MockCrossClusterTaskMockRecorder) RetryErr ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) RetryErr(err interface{}) *gomock.Call
RetryErr indicates an expected call of RetryErr.
func (*MockCrossClusterTaskMockRecorder) SetPriority ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) SetPriority(arg0 interface{}) *gomock.Call
SetPriority indicates an expected call of SetPriority.
func (*MockCrossClusterTaskMockRecorder) State ¶ added in v0.23.1
func (mr *MockCrossClusterTaskMockRecorder) State() *gomock.Call
State indicates an expected call of State.
type MockExecutor ¶
type MockExecutor struct {
// contains filtered or unexported fields
}
MockExecutor is a mock of Executor interface.
func NewMockExecutor ¶
func NewMockExecutor(ctrl *gomock.Controller) *MockExecutor
NewMockExecutor creates a new mock instance.
func (*MockExecutor) EXPECT ¶
func (m *MockExecutor) EXPECT() *MockExecutorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockExecutorMockRecorder ¶
type MockExecutorMockRecorder struct {
// contains filtered or unexported fields
}
MockExecutorMockRecorder is the mock recorder for MockExecutor.
func (*MockExecutorMockRecorder) Execute ¶
func (mr *MockExecutorMockRecorder) Execute(task, shouldProcessTask interface{}) *gomock.Call
Execute indicates an expected call of Execute.
type MockFetcher ¶ added in v0.22.0
type MockFetcher struct {
// contains filtered or unexported fields
}
MockFetcher is a mock of Fetcher interface.
func NewMockFetcher ¶ added in v0.22.0
func NewMockFetcher(ctrl *gomock.Controller) *MockFetcher
NewMockFetcher creates a new mock instance.
func (*MockFetcher) EXPECT ¶ added in v0.22.0
func (m *MockFetcher) EXPECT() *MockFetcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockFetcher) Fetch ¶ added in v0.22.0
func (m *MockFetcher) Fetch(shardID int, fetchParams ...interface{}) future.Future
Fetch mocks base method.
func (*MockFetcher) GetSourceCluster ¶ added in v0.22.0
func (m *MockFetcher) GetSourceCluster() string
GetSourceCluster mocks base method.
type MockFetcherMockRecorder ¶ added in v0.22.0
type MockFetcherMockRecorder struct {
// contains filtered or unexported fields
}
MockFetcherMockRecorder is the mock recorder for MockFetcher.
func (*MockFetcherMockRecorder) Fetch ¶ added in v0.22.0
func (mr *MockFetcherMockRecorder) Fetch(shardID interface{}, fetchParams ...interface{}) *gomock.Call
Fetch indicates an expected call of Fetch.
func (*MockFetcherMockRecorder) GetSourceCluster ¶ added in v0.22.0
func (mr *MockFetcherMockRecorder) GetSourceCluster() *gomock.Call
GetSourceCluster indicates an expected call of GetSourceCluster.
func (*MockFetcherMockRecorder) Start ¶ added in v0.22.0
func (mr *MockFetcherMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockFetcherMockRecorder) Stop ¶ added in v0.22.0
func (mr *MockFetcherMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockInfo ¶
type MockInfo struct {
// contains filtered or unexported fields
}
MockInfo is a mock of Info interface.
func NewMockInfo ¶
func NewMockInfo(ctrl *gomock.Controller) *MockInfo
NewMockInfo creates a new mock instance.
func (*MockInfo) EXPECT ¶
func (m *MockInfo) EXPECT() *MockInfoMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockInfo) GetDomainID ¶
GetDomainID mocks base method.
func (*MockInfo) GetVisibilityTimestamp ¶
GetVisibilityTimestamp mocks base method.
func (*MockInfo) GetWorkflowID ¶
GetWorkflowID mocks base method.
type MockInfoMockRecorder ¶
type MockInfoMockRecorder struct {
// contains filtered or unexported fields
}
MockInfoMockRecorder is the mock recorder for MockInfo.
func (*MockInfoMockRecorder) GetDomainID ¶
func (mr *MockInfoMockRecorder) GetDomainID() *gomock.Call
GetDomainID indicates an expected call of GetDomainID.
func (*MockInfoMockRecorder) GetRunID ¶
func (mr *MockInfoMockRecorder) GetRunID() *gomock.Call
GetRunID indicates an expected call of GetRunID.
func (*MockInfoMockRecorder) GetTaskID ¶
func (mr *MockInfoMockRecorder) GetTaskID() *gomock.Call
GetTaskID indicates an expected call of GetTaskID.
func (*MockInfoMockRecorder) GetTaskType ¶
func (mr *MockInfoMockRecorder) GetTaskType() *gomock.Call
GetTaskType indicates an expected call of GetTaskType.
func (*MockInfoMockRecorder) GetVersion ¶
func (mr *MockInfoMockRecorder) GetVersion() *gomock.Call
GetVersion indicates an expected call of GetVersion.
func (*MockInfoMockRecorder) GetVisibilityTimestamp ¶
func (mr *MockInfoMockRecorder) GetVisibilityTimestamp() *gomock.Call
GetVisibilityTimestamp indicates an expected call of GetVisibilityTimestamp.
func (*MockInfoMockRecorder) GetWorkflowID ¶
func (mr *MockInfoMockRecorder) GetWorkflowID() *gomock.Call
GetWorkflowID indicates an expected call of GetWorkflowID.
type MockKey ¶
type MockKey struct {
// contains filtered or unexported fields
}
MockKey is a mock of Key interface.
func NewMockKey ¶
func NewMockKey(ctrl *gomock.Controller) *MockKey
NewMockKey creates a new mock instance.
func (*MockKey) EXPECT ¶
func (m *MockKey) EXPECT() *MockKeyMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockKeyMockRecorder ¶
type MockKeyMockRecorder struct {
// contains filtered or unexported fields
}
MockKeyMockRecorder is the mock recorder for MockKey.
func (*MockKeyMockRecorder) Less ¶
func (mr *MockKeyMockRecorder) Less(arg0 interface{}) *gomock.Call
Less indicates an expected call of Less.
type MockPriorityAssigner ¶
type MockPriorityAssigner struct {
// contains filtered or unexported fields
}
MockPriorityAssigner is a mock of PriorityAssigner interface.
func NewMockPriorityAssigner ¶
func NewMockPriorityAssigner(ctrl *gomock.Controller) *MockPriorityAssigner
NewMockPriorityAssigner creates a new mock instance.
func (*MockPriorityAssigner) Assign ¶
func (m *MockPriorityAssigner) Assign(arg0 Task) error
Assign mocks base method.
func (*MockPriorityAssigner) EXPECT ¶
func (m *MockPriorityAssigner) EXPECT() *MockPriorityAssignerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockPriorityAssignerMockRecorder ¶
type MockPriorityAssignerMockRecorder struct {
// contains filtered or unexported fields
}
MockPriorityAssignerMockRecorder is the mock recorder for MockPriorityAssigner.
func (*MockPriorityAssignerMockRecorder) Assign ¶
func (mr *MockPriorityAssignerMockRecorder) Assign(arg0 interface{}) *gomock.Call
Assign indicates an expected call of Assign.
type MockProcessor ¶
type MockProcessor struct {
// contains filtered or unexported fields
}
MockProcessor is a mock of Processor interface.
func NewMockProcessor ¶
func NewMockProcessor(ctrl *gomock.Controller) *MockProcessor
NewMockProcessor creates a new mock instance.
func (*MockProcessor) EXPECT ¶
func (m *MockProcessor) EXPECT() *MockProcessorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockProcessor) StopShardProcessor ¶
func (m *MockProcessor) StopShardProcessor(arg0 shard.Context)
StopShardProcessor mocks base method.
func (*MockProcessor) Submit ¶
func (m *MockProcessor) Submit(arg0 Task) error
Submit mocks base method.
type MockProcessorMockRecorder ¶
type MockProcessorMockRecorder struct {
// contains filtered or unexported fields
}
MockProcessorMockRecorder is the mock recorder for MockProcessor.
func (*MockProcessorMockRecorder) Start ¶
func (mr *MockProcessorMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockProcessorMockRecorder) Stop ¶
func (mr *MockProcessorMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockProcessorMockRecorder) StopShardProcessor ¶
func (mr *MockProcessorMockRecorder) StopShardProcessor(arg0 interface{}) *gomock.Call
StopShardProcessor indicates an expected call of StopShardProcessor.
func (*MockProcessorMockRecorder) Submit ¶
func (mr *MockProcessorMockRecorder) Submit(arg0 interface{}) *gomock.Call
Submit indicates an expected call of Submit.
func (*MockProcessorMockRecorder) TrySubmit ¶
func (mr *MockProcessorMockRecorder) TrySubmit(arg0 interface{}) *gomock.Call
TrySubmit indicates an expected call of TrySubmit.
type MockRedispatcher ¶ added in v0.14.0
type MockRedispatcher struct {
// contains filtered or unexported fields
}
MockRedispatcher is a mock of Redispatcher interface.
func NewMockRedispatcher ¶ added in v0.14.0
func NewMockRedispatcher(ctrl *gomock.Controller) *MockRedispatcher
NewMockRedispatcher creates a new mock instance.
func (*MockRedispatcher) AddTask ¶ added in v0.14.0
func (m *MockRedispatcher) AddTask(arg0 Task)
AddTask mocks base method.
func (*MockRedispatcher) EXPECT ¶ added in v0.14.0
func (m *MockRedispatcher) EXPECT() *MockRedispatcherMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockRedispatcher) Redispatch ¶ added in v0.14.0
func (m *MockRedispatcher) Redispatch(targetSize int)
Redispatch mocks base method.
func (*MockRedispatcher) Size ¶ added in v0.14.0
func (m *MockRedispatcher) Size() int
Size mocks base method.
func (*MockRedispatcher) Start ¶ added in v0.14.0
func (m *MockRedispatcher) Start()
Start mocks base method.
func (*MockRedispatcher) Stop ¶ added in v0.14.0
func (m *MockRedispatcher) Stop()
Stop mocks base method.
type MockRedispatcherMockRecorder ¶ added in v0.14.0
type MockRedispatcherMockRecorder struct {
// contains filtered or unexported fields
}
MockRedispatcherMockRecorder is the mock recorder for MockRedispatcher.
func (*MockRedispatcherMockRecorder) AddTask ¶ added in v0.14.0
func (mr *MockRedispatcherMockRecorder) AddTask(arg0 interface{}) *gomock.Call
AddTask indicates an expected call of AddTask.
func (*MockRedispatcherMockRecorder) Redispatch ¶ added in v0.14.0
func (mr *MockRedispatcherMockRecorder) Redispatch(targetSize interface{}) *gomock.Call
Redispatch indicates an expected call of Redispatch.
func (*MockRedispatcherMockRecorder) Size ¶ added in v0.14.0
func (mr *MockRedispatcherMockRecorder) Size() *gomock.Call
Size indicates an expected call of Size.
func (*MockRedispatcherMockRecorder) Start ¶ added in v0.14.0
func (mr *MockRedispatcherMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockRedispatcherMockRecorder) Stop ¶ added in v0.14.0
func (mr *MockRedispatcherMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockTask ¶
type MockTask struct {
// contains filtered or unexported fields
}
MockTask is a mock of Task interface.
func NewMockTask ¶
func NewMockTask(ctrl *gomock.Controller) *MockTask
NewMockTask creates a new mock instance.
func (*MockTask) EXPECT ¶
func (m *MockTask) EXPECT() *MockTaskMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockTask) GetDomainID ¶
GetDomainID mocks base method.
func (*MockTask) GetQueueType ¶
GetQueueType mocks base method.
func (*MockTask) GetVisibilityTimestamp ¶
GetVisibilityTimestamp mocks base method.
func (*MockTask) GetWorkflowID ¶
GetWorkflowID mocks base method.
func (*MockTask) SetPriority ¶
SetPriority mocks base method.
type MockTaskMockRecorder ¶
type MockTaskMockRecorder struct {
// contains filtered or unexported fields
}
MockTaskMockRecorder is the mock recorder for MockTask.
func (*MockTaskMockRecorder) Ack ¶
func (mr *MockTaskMockRecorder) Ack() *gomock.Call
Ack indicates an expected call of Ack.
func (*MockTaskMockRecorder) Execute ¶
func (mr *MockTaskMockRecorder) Execute() *gomock.Call
Execute indicates an expected call of Execute.
func (*MockTaskMockRecorder) GetAttempt ¶
func (mr *MockTaskMockRecorder) GetAttempt() *gomock.Call
GetAttempt indicates an expected call of GetAttempt.
func (*MockTaskMockRecorder) GetDomainID ¶
func (mr *MockTaskMockRecorder) GetDomainID() *gomock.Call
GetDomainID indicates an expected call of GetDomainID.
func (*MockTaskMockRecorder) GetInfo ¶ added in v0.23.1
func (mr *MockTaskMockRecorder) GetInfo() *gomock.Call
GetInfo indicates an expected call of GetInfo.
func (*MockTaskMockRecorder) GetQueueType ¶
func (mr *MockTaskMockRecorder) GetQueueType() *gomock.Call
GetQueueType indicates an expected call of GetQueueType.
func (*MockTaskMockRecorder) GetRunID ¶
func (mr *MockTaskMockRecorder) GetRunID() *gomock.Call
GetRunID indicates an expected call of GetRunID.
func (*MockTaskMockRecorder) GetShard ¶
func (mr *MockTaskMockRecorder) GetShard() *gomock.Call
GetShard indicates an expected call of GetShard.
func (*MockTaskMockRecorder) GetTaskID ¶
func (mr *MockTaskMockRecorder) GetTaskID() *gomock.Call
GetTaskID indicates an expected call of GetTaskID.
func (*MockTaskMockRecorder) GetTaskType ¶
func (mr *MockTaskMockRecorder) GetTaskType() *gomock.Call
GetTaskType indicates an expected call of GetTaskType.
func (*MockTaskMockRecorder) GetVersion ¶
func (mr *MockTaskMockRecorder) GetVersion() *gomock.Call
GetVersion indicates an expected call of GetVersion.
func (*MockTaskMockRecorder) GetVisibilityTimestamp ¶
func (mr *MockTaskMockRecorder) GetVisibilityTimestamp() *gomock.Call
GetVisibilityTimestamp indicates an expected call of GetVisibilityTimestamp.
func (*MockTaskMockRecorder) GetWorkflowID ¶
func (mr *MockTaskMockRecorder) GetWorkflowID() *gomock.Call
GetWorkflowID indicates an expected call of GetWorkflowID.
func (*MockTaskMockRecorder) HandleErr ¶
func (mr *MockTaskMockRecorder) HandleErr(err interface{}) *gomock.Call
HandleErr indicates an expected call of HandleErr.
func (*MockTaskMockRecorder) Nack ¶
func (mr *MockTaskMockRecorder) Nack() *gomock.Call
Nack indicates an expected call of Nack.
func (*MockTaskMockRecorder) Priority ¶
func (mr *MockTaskMockRecorder) Priority() *gomock.Call
Priority indicates an expected call of Priority.
func (*MockTaskMockRecorder) RetryErr ¶
func (mr *MockTaskMockRecorder) RetryErr(err interface{}) *gomock.Call
RetryErr indicates an expected call of RetryErr.
func (*MockTaskMockRecorder) SetPriority ¶
func (mr *MockTaskMockRecorder) SetPriority(arg0 interface{}) *gomock.Call
SetPriority indicates an expected call of SetPriority.
func (*MockTaskMockRecorder) State ¶
func (mr *MockTaskMockRecorder) State() *gomock.Call
State indicates an expected call of State.
type PriorityAssigner ¶
PriorityAssigner assigns priority to Tasks
func NewPriorityAssigner ¶
func NewPriorityAssigner( currentClusterName string, domainCache cache.DomainCache, logger log.Logger, metricClient metrics.Client, config *config.Config, ) PriorityAssigner
NewPriorityAssigner creates a new task priority assigner
type Processor ¶
type Processor interface { common.Daemon StopShardProcessor(shard.Context) Submit(Task) error TrySubmit(Task) (bool, error) }
Processor is the worker pool for processing Tasks
type QueueType ¶
type QueueType int
QueueType is the type of task queue
const ( // QueueTypeActiveTransfer is the queue type for active transfer queue processor QueueTypeActiveTransfer QueueType = iota + 1 // QueueTypeStandbyTransfer is the queue type for standby transfer queue processor QueueTypeStandbyTransfer // QueueTypeActiveTimer is the queue type for active timer queue processor QueueTypeActiveTimer // QueueTypeStandbyTimer is the queue type for standby timer queue processor QueueTypeStandbyTimer // QueueTypeReplication is the queue type for replication queue processor QueueTypeReplication // QueueTypeCrossCluster is the queue type for cross cluster queue processor QueueTypeCrossCluster )
type Redispatcher ¶ added in v0.14.0
Redispatcher buffers tasks and periodically redispatch them to Processor redispatch can also be triggered immediately by calling the Redispatch method
func NewRedispatcher ¶ added in v0.14.0
func NewRedispatcher( taskProcessor Processor, timeSource clock.TimeSource, options *RedispatcherOptions, logger log.Logger, metricsScope metrics.Scope, ) Redispatcher
NewRedispatcher creates a new task Redispatcher
type RedispatcherOptions ¶ added in v0.14.0
type RedispatcherOptions struct { TaskRedispatchInterval dynamicconfig.DurationPropertyFn TaskRedispatchIntervalJitterCoefficient dynamicconfig.FloatPropertyFn }
RedispatcherOptions configs redispatch interval
type Task ¶
type Task interface { task.PriorityTask Info GetQueueType() QueueType GetShard() shard.Context GetAttempt() int GetInfo() Info }
Task is the interface for all tasks generated by history service
func NewCrossClusterTargetTask ¶ added in v0.23.1
func NewCrossClusterTargetTask( shard shard.Context, taskRequest *types.CrossClusterTaskRequest, taskExecutor Executor, taskProcessor Processor, logger log.Logger, redispatchFn func(task Task), maxRetryCount dynamicconfig.IntPropertyFn, ) (Task, future.Future)
NewCrossClusterTargetTask is called at the target cluster to process the cross cluster task the returned the Future will be unblocked after the task is processed. The future value has type types.CrossClusterTaskResponse and there won't be any error returned for this future. All errors will be recorded by the FailedCause field in the response.
func NewTimerTask ¶
func NewTimerTask( shard shard.Context, taskInfo Info, queueType QueueType, logger log.Logger, taskFilter Filter, taskExecutor Executor, taskProcessor Processor, redispatchFn func(task Task), criticalRetryCount dynamicconfig.IntPropertyFn, ) Task
NewTimerTask creates a new timer task
func NewTransferTask ¶
func NewTransferTask( shard shard.Context, taskInfo Info, queueType QueueType, logger log.Logger, taskFilter Filter, taskExecutor Executor, taskProcessor Processor, redispatchFn func(task Task), criticalRetryCount dynamicconfig.IntPropertyFn, ) Task
NewTransferTask creates a new transfer task
Source Files ¶
- constants.go
- cross_cluster_source_task_executor.go
- cross_cluster_target_task_executor.go
- cross_cluster_task.go
- cross_cluster_task_processor.go
- event_logger.go
- fetcher.go
- interface.go
- interface_mock.go
- priority_assigner.go
- processor.go
- redispatcher.go
- standby_task_util.go
- task.go
- task_util.go
- timer_active_task_executor.go
- timer_standby_task_executor.go
- timer_task_executor_base.go
- transfer_active_task_executor.go
- transfer_standby_task_executor.go
- transfer_task_executor_base.go