Documentation ¶
Overview ¶
Package history is a generated GoMock package.
Index ¶
- Constants
- Variables
- func CheckTaskVersion(shard shard.Context, logger log.Logger, namespace *namespace.Namespace, ...) error
- func ConfigProvider(dc *dynamicconfig.Collection, persistenceConfig config.Persistence, ...) *configs.Config
- func ESProcessorConfigProvider(serviceConfig *configs.Config) *elasticsearch.ProcessorConfig
- func EventNotifierProvider(timeSource clock.TimeSource, metricsHandler metrics.Handler, ...) events.Notifier
- func HistoryEngineFactoryProvider(params HistoryEngineFactoryParams) shard.EngineFactory
- func MakeDirectiveForActivityTask(mutableState workflow.MutableState, activityInfo *persistencespb.ActivityInfo) *taskqueuespb.TaskVersionDirective
- func MakeDirectiveForWorkflowTask(ms workflow.MutableState) *taskqueuespb.TaskVersionDirective
- func NewArchivalQueueTaskExecutor(archiver archival.Archiver, shardContext shard.Context, ...) queues.Executor
- func NewEngineWithShardContext(shard shard.Context, clientBean client.Bean, ...) shard.Engine
- func NewHostRateLimiterRateFn(hostRPS dynamicconfig.IntPropertyFn, ...) quotas.RateFn
- func NewWorkflowRebuilder(shard shard.Context, workflowCache wcache.Cache, logger log.Logger) *workflowRebuilderImpl
- func PersistenceRateLimitingParamsProvider(serviceConfig *configs.Config, ...) service.PersistenceRateLimitingParams
- func QueueFactoryLifetimeHooks(params QueueFactoriesLifetimeHookParams)
- func QueueSchedulerRateLimiterProvider(ownershipBasedQuotaScaler shard.LazyLoadedOwnershipBasedQuotaScaler, ...) (queues.SchedulerRateLimiter, error)
- func RateLimitInterceptorProvider(serviceConfig *configs.Config) *interceptor.RateLimitInterceptor
- func RetryableInterceptorProvider() *interceptor.RetryableInterceptor
- func ServiceLifetimeHooks(lc fx.Lifecycle, svc *Service)
- func ServiceResolverProvider(membershipMonitor membership.Monitor) (membership.ServiceResolver, error)
- func TelemetryInterceptorProvider(logger log.Logger, namespaceRegistry namespace.Registry, ...) *interceptor.TelemetryInterceptor
- func ThrottledLoggerRpsFnProvider(serviceConfig *configs.Config) resource.ThrottledLoggerRpsFn
- func VisibilityManagerProvider(logger log.Logger, metricsHandler metrics.Handler, ...) (manager.VisibilityManager, error)
- type ArchivalQueueFactoryParams
- type Handler
- func (h *Handler) AddTasks(ctx context.Context, request *historyservice.AddTasksRequest) (*historyservice.AddTasksResponse, error)
- func (h *Handler) CloseShard(_ context.Context, request *historyservice.CloseShardRequest) (_ *historyservice.CloseShardResponse, retError error)
- func (h *Handler) CompleteNexusOperation(ctx context.Context, request *historyservice.CompleteNexusOperationRequest) (_ *historyservice.CompleteNexusOperationResponse, retErr error)
- func (h *Handler) DeleteDLQTasks(ctx context.Context, request *historyservice.DeleteDLQTasksRequest) (*historyservice.DeleteDLQTasksResponse, error)
- func (h *Handler) DeleteWorkflowExecution(ctx context.Context, request *historyservice.DeleteWorkflowExecutionRequest) (_ *historyservice.DeleteWorkflowExecutionResponse, retError error)
- func (h *Handler) DeleteWorkflowVisibilityRecord(ctx context.Context, ...) (_ *historyservice.DeleteWorkflowVisibilityRecordResponse, retError error)
- func (h *Handler) DescribeHistoryHost(_ context.Context, _ *historyservice.DescribeHistoryHostRequest) (_ *historyservice.DescribeHistoryHostResponse, retError error)
- func (h *Handler) DescribeMutableState(ctx context.Context, request *historyservice.DescribeMutableStateRequest) (_ *historyservice.DescribeMutableStateResponse, retError error)
- func (h *Handler) DescribeWorkflowExecution(ctx context.Context, request *historyservice.DescribeWorkflowExecutionRequest) (_ *historyservice.DescribeWorkflowExecutionResponse, retError error)
- func (h *Handler) ExecuteMultiOperation(ctx context.Context, request *historyservice.ExecuteMultiOperationRequest) (_ *historyservice.ExecuteMultiOperationResponse, retError error)
- func (h *Handler) ForceDeleteWorkflowExecution(ctx context.Context, ...) (_ *historyservice.ForceDeleteWorkflowExecutionResponse, retErr error)
- func (h *Handler) GenerateLastHistoryReplicationTasks(ctx context.Context, ...) (_ *historyservice.GenerateLastHistoryReplicationTasksResponse, retError error)
- func (h *Handler) GetDLQMessages(ctx context.Context, request *historyservice.GetDLQMessagesRequest) (_ *historyservice.GetDLQMessagesResponse, retError error)
- func (h *Handler) GetDLQReplicationMessages(ctx context.Context, request *historyservice.GetDLQReplicationMessagesRequest) (_ *historyservice.GetDLQReplicationMessagesResponse, retError error)
- func (h *Handler) GetDLQTasks(ctx context.Context, request *historyservice.GetDLQTasksRequest) (*historyservice.GetDLQTasksResponse, error)
- func (h *Handler) GetMutableState(ctx context.Context, request *historyservice.GetMutableStateRequest) (_ *historyservice.GetMutableStateResponse, retError error)
- func (h *Handler) GetReplicationMessages(ctx context.Context, request *historyservice.GetReplicationMessagesRequest) (_ *historyservice.GetReplicationMessagesResponse, retError error)
- func (h *Handler) GetReplicationStatus(ctx context.Context, request *historyservice.GetReplicationStatusRequest) (_ *historyservice.GetReplicationStatusResponse, retError error)
- func (h *Handler) GetShard(ctx context.Context, request *historyservice.GetShardRequest) (_ *historyservice.GetShardResponse, retError error)
- func (h *Handler) GetWorkflowExecutionHistory(ctx context.Context, ...) (_ *historyservice.GetWorkflowExecutionHistoryResponse, retErr error)
- func (h *Handler) GetWorkflowExecutionHistoryReverse(ctx context.Context, ...) (_ *historyservice.GetWorkflowExecutionHistoryReverseResponse, retErr error)
- func (h *Handler) GetWorkflowExecutionRawHistory(ctx context.Context, ...) (_ *historyservice.GetWorkflowExecutionRawHistoryResponse, retErr error)
- func (h *Handler) GetWorkflowExecutionRawHistoryV2(ctx context.Context, ...) (_ *historyservice.GetWorkflowExecutionRawHistoryV2Response, retErr error)
- func (h *Handler) ImportWorkflowExecution(ctx context.Context, request *historyservice.ImportWorkflowExecutionRequest) (_ *historyservice.ImportWorkflowExecutionResponse, retError error)
- func (h *Handler) IsActivityTaskValid(ctx context.Context, request *historyservice.IsActivityTaskValidRequest) (_ *historyservice.IsActivityTaskValidResponse, retError error)
- func (h *Handler) IsWorkflowTaskValid(ctx context.Context, request *historyservice.IsWorkflowTaskValidRequest) (_ *historyservice.IsWorkflowTaskValidResponse, retError error)
- func (h *Handler) ListQueues(ctx context.Context, request *historyservice.ListQueuesRequest) (*historyservice.ListQueuesResponse, error)
- func (h *Handler) ListTasks(ctx context.Context, request *historyservice.ListTasksRequest) (_ *historyservice.ListTasksResponse, retError error)
- func (h *Handler) MergeDLQMessages(ctx context.Context, request *historyservice.MergeDLQMessagesRequest) (_ *historyservice.MergeDLQMessagesResponse, retError error)
- func (h *Handler) PollMutableState(ctx context.Context, request *historyservice.PollMutableStateRequest) (_ *historyservice.PollMutableStateResponse, retError error)
- func (h *Handler) PollWorkflowExecutionUpdate(ctx context.Context, ...) (_ *historyservice.PollWorkflowExecutionUpdateResponse, retErr error)
- func (h *Handler) PurgeDLQMessages(ctx context.Context, request *historyservice.PurgeDLQMessagesRequest) (_ *historyservice.PurgeDLQMessagesResponse, retError error)
- func (h *Handler) QueryWorkflow(ctx context.Context, request *historyservice.QueryWorkflowRequest) (_ *historyservice.QueryWorkflowResponse, retError error)
- func (h *Handler) ReapplyEvents(ctx context.Context, request *historyservice.ReapplyEventsRequest) (_ *historyservice.ReapplyEventsResponse, retError error)
- func (h *Handler) RebuildMutableState(ctx context.Context, request *historyservice.RebuildMutableStateRequest) (_ *historyservice.RebuildMutableStateResponse, retError error)
- func (h *Handler) RecordActivityTaskHeartbeat(ctx context.Context, ...) (_ *historyservice.RecordActivityTaskHeartbeatResponse, retError error)
- func (h *Handler) RecordActivityTaskStarted(ctx context.Context, request *historyservice.RecordActivityTaskStartedRequest) (_ *historyservice.RecordActivityTaskStartedResponse, retError error)
- func (h *Handler) RecordChildExecutionCompleted(ctx context.Context, ...) (_ *historyservice.RecordChildExecutionCompletedResponse, retError error)
- func (h *Handler) RecordWorkflowTaskStarted(ctx context.Context, request *historyservice.RecordWorkflowTaskStartedRequest) (_ *historyservice.RecordWorkflowTaskStartedResponse, retError error)
- func (h *Handler) RefreshWorkflowTasks(ctx context.Context, request *historyservice.RefreshWorkflowTasksRequest) (_ *historyservice.RefreshWorkflowTasksResponse, retError error)
- func (h *Handler) RemoveSignalMutableState(ctx context.Context, request *historyservice.RemoveSignalMutableStateRequest) (_ *historyservice.RemoveSignalMutableStateResponse, retError error)
- func (h *Handler) RemoveTask(ctx context.Context, request *historyservice.RemoveTaskRequest) (_ *historyservice.RemoveTaskResponse, retError error)
- func (h *Handler) ReplicateEventsV2(ctx context.Context, request *historyservice.ReplicateEventsV2Request) (_ *historyservice.ReplicateEventsV2Response, retError error)
- func (h *Handler) ReplicateWorkflowState(ctx context.Context, request *historyservice.ReplicateWorkflowStateRequest) (_ *historyservice.ReplicateWorkflowStateResponse, retError error)
- func (h *Handler) RequestCancelWorkflowExecution(ctx context.Context, ...) (_ *historyservice.RequestCancelWorkflowExecutionResponse, retError error)
- func (h *Handler) ResetStickyTaskQueue(ctx context.Context, request *historyservice.ResetStickyTaskQueueRequest) (_ *historyservice.ResetStickyTaskQueueResponse, retError error)
- func (h *Handler) ResetWorkflowExecution(ctx context.Context, request *historyservice.ResetWorkflowExecutionRequest) (_ *historyservice.ResetWorkflowExecutionResponse, retError error)
- func (h *Handler) RespondActivityTaskCanceled(ctx context.Context, ...) (_ *historyservice.RespondActivityTaskCanceledResponse, retError error)
- func (h *Handler) RespondActivityTaskCompleted(ctx context.Context, ...) (_ *historyservice.RespondActivityTaskCompletedResponse, retError error)
- func (h *Handler) RespondActivityTaskFailed(ctx context.Context, request *historyservice.RespondActivityTaskFailedRequest) (_ *historyservice.RespondActivityTaskFailedResponse, retError error)
- func (h *Handler) RespondWorkflowTaskCompleted(ctx context.Context, ...) (_ *historyservice.RespondWorkflowTaskCompletedResponse, retError error)
- func (h *Handler) RespondWorkflowTaskFailed(ctx context.Context, request *historyservice.RespondWorkflowTaskFailedRequest) (_ *historyservice.RespondWorkflowTaskFailedResponse, retError error)
- func (h *Handler) ScheduleWorkflowTask(ctx context.Context, request *historyservice.ScheduleWorkflowTaskRequest) (_ *historyservice.ScheduleWorkflowTaskResponse, retError error)
- func (h *Handler) SignalWithStartWorkflowExecution(ctx context.Context, ...) (_ *historyservice.SignalWithStartWorkflowExecutionResponse, retError error)
- func (h *Handler) SignalWorkflowExecution(ctx context.Context, request *historyservice.SignalWorkflowExecutionRequest) (_ *historyservice.SignalWorkflowExecutionResponse, retError error)
- func (h *Handler) Start()
- func (h *Handler) StartWorkflowExecution(ctx context.Context, request *historyservice.StartWorkflowExecutionRequest) (_ *historyservice.StartWorkflowExecutionResponse, retError error)
- func (h *Handler) Stop()
- func (h *Handler) StreamWorkflowReplicationMessages(server historyservice.HistoryService_StreamWorkflowReplicationMessagesServer) (retError error)
- func (h *Handler) SyncActivity(ctx context.Context, request *historyservice.SyncActivityRequest) (_ *historyservice.SyncActivityResponse, retError error)
- func (h *Handler) SyncShardStatus(ctx context.Context, request *historyservice.SyncShardStatusRequest) (_ *historyservice.SyncShardStatusResponse, retError error)
- func (h *Handler) TerminateWorkflowExecution(ctx context.Context, request *historyservice.TerminateWorkflowExecutionRequest) (_ *historyservice.TerminateWorkflowExecutionResponse, retError error)
- func (h *Handler) UpdateWorkflowExecution(ctx context.Context, request *historyservice.UpdateWorkflowExecutionRequest) (_ *historyservice.UpdateWorkflowExecutionResponse, retError error)
- func (h *Handler) VerifyChildExecutionCompletionRecorded(ctx context.Context, ...) (_ *historyservice.VerifyChildExecutionCompletionRecordedResponse, ...)
- func (h *Handler) VerifyFirstWorkflowTaskScheduled(ctx context.Context, ...) (_ *historyservice.VerifyFirstWorkflowTaskScheduledResponse, retError error)
- type HistoryEngineFactoryParams
- type MockworkflowRebuilder
- type MockworkflowRebuilderMockRecorder
- type NewHandlerArgs
- type QueueFactoriesLifetimeHookParams
- type QueueFactory
- func NewArchivalQueueFactory(params ArchivalQueueFactoryParams) QueueFactory
- func NewMemoryScheduledQueueFactory(params memoryScheduledQueueFactoryParams) QueueFactory
- func NewOutboundQueueFactory(params outboundQueueFactoryParams) QueueFactory
- func NewTimerQueueFactory(params timerQueueFactoryParams) QueueFactory
- func NewTransferQueueFactory(params transferQueueFactoryParams) QueueFactory
- func NewVisibilityQueueFactory(params visibilityQueueFactoryParams) QueueFactory
- type QueueFactoryBase
- type QueueFactoryBaseParams
- type Service
Constants ¶
const QueueFactoryFxGroup = "queueFactory"
Variables ¶
var ( // ErrMutableStateIsNil is returned when the mutable state is nil ErrMutableStateIsNil = errors.New("mutable state is nil") // ErrWorkflowExecutionIsStillRunning is returned when the workflow execution is still running ErrWorkflowExecutionIsStillRunning = errors.New("workflow execution is still running") )
var ( // ArchivalTaskPriorities is the map of task priority to weight for the archival queue. // The archival queue only uses the low task priority, so we only define a weight for that priority. ArchivalTaskPriorities = configs.ConvertWeightsToDynamicConfigValue(map[ctasks.Priority]int{ ctasks.PriorityLow: 10, }) )
var Module = fx.Options( resource.Module, fx.Provide(hsm.NewRegistry), workflow.Module, shard.Module, events.Module, cache.Module, archival.Module, fx.Provide(dynamicconfig.NewCollection), fx.Provide(ConfigProvider), fx.Provide(workflow.NewCommandHandlerRegistry), fx.Provide(RetryableInterceptorProvider), fx.Provide(TelemetryInterceptorProvider), fx.Provide(RateLimitInterceptorProvider), fx.Provide(service.GrpcServerOptionsProvider), fx.Provide(ESProcessorConfigProvider), fx.Provide(VisibilityManagerProvider), fx.Provide(ThrottledLoggerRpsFnProvider), fx.Provide(PersistenceRateLimitingParamsProvider), service.PersistenceLazyLoadedServiceResolverModule, fx.Provide(ServiceResolverProvider), fx.Provide(EventNotifierProvider), fx.Provide(HistoryEngineFactoryProvider), fx.Provide(HandlerProvider), fx.Provide(ServiceProvider), fx.Invoke(ServiceLifetimeHooks), callbacks.Module, schedulerhsm.Module, nexusoperations.Module, fx.Invoke(nexusworkflow.RegisterCommandHandlers), )
var QueueModule = fx.Options( fx.Provide( QueueSchedulerRateLimiterProvider, func(tqm persistence.HistoryTaskQueueManager) queues.QueueWriter { return tqm }, queues.NewDLQWriter, fx.Annotated{ Group: QueueFactoryFxGroup, Target: NewTransferQueueFactory, }, fx.Annotated{ Group: QueueFactoryFxGroup, Target: NewTimerQueueFactory, }, fx.Annotated{ Group: QueueFactoryFxGroup, Target: NewVisibilityQueueFactory, }, fx.Annotated{ Group: QueueFactoryFxGroup, Target: NewMemoryScheduledQueueFactory, }, getOptionalQueueFactories, ), fx.Invoke(QueueFactoryLifetimeHooks), )
Functions ¶
func CheckTaskVersion ¶ added in v1.19.0
func CheckTaskVersion( shard shard.Context, logger log.Logger, namespace *namespace.Namespace, version int64, taskVersion int64, task interface{}, ) error
CheckTaskVersion will return an error if task version check fails
func ConfigProvider ¶ added in v1.13.0
func ConfigProvider( dc *dynamicconfig.Collection, persistenceConfig config.Persistence, esConfig *esclient.Config, ) *configs.Config
func ESProcessorConfigProvider ¶ added in v1.13.0
func ESProcessorConfigProvider( serviceConfig *configs.Config, ) *elasticsearch.ProcessorConfig
func EventNotifierProvider ¶ added in v1.15.0
func HistoryEngineFactoryProvider ¶ added in v1.15.0
func HistoryEngineFactoryProvider( params HistoryEngineFactoryParams, ) shard.EngineFactory
func MakeDirectiveForActivityTask ¶ added in v1.24.0
func MakeDirectiveForActivityTask(mutableState workflow.MutableState, activityInfo *persistencespb.ActivityInfo) *taskqueuespb.TaskVersionDirective
func MakeDirectiveForWorkflowTask ¶ added in v1.24.0
func MakeDirectiveForWorkflowTask(ms workflow.MutableState) *taskqueuespb.TaskVersionDirective
func NewArchivalQueueTaskExecutor ¶ added in v1.20.0
func NewArchivalQueueTaskExecutor( archiver archival.Archiver, shardContext shard.Context, workflowCache cache.Cache, relocatableAttributesFetcher workflow.RelocatableAttributesFetcher, metricsHandler metrics.Handler, logger log.Logger, ) queues.Executor
NewArchivalQueueTaskExecutor creates a new queue task executor for the archival queue. If you use this executor, you must monitor for any metrics.ArchivalTaskInvalidURI errors. If this metric is emitted, it means that an archival URI is invalid and the task will never succeed, which is a serious problem because the archival queue retries tasks forever.
func NewEngineWithShardContext ¶
func NewEngineWithShardContext( shard shard.Context, clientBean client.Bean, matchingClient matchingservice.MatchingServiceClient, sdkClientFactory sdk.ClientFactory, eventNotifier events.Notifier, config *configs.Config, rawMatchingClient matchingservice.MatchingServiceClient, workflowCache wcache.Cache, eventSerializer serialization.Serializer, queueProcessorFactories []QueueFactory, replicationTaskFetcherFactory replication.TaskFetcherFactory, replicationTaskExecutorProvider replication.TaskExecutorProvider, workflowConsistencyChecker api.WorkflowConsistencyChecker, tracerProvider trace.TracerProvider, persistenceVisibilityMgr manager.VisibilityManager, eventBlobCache persistence.XDCCache, taskCategoryRegistry tasks.TaskCategoryRegistry, dlqWriter replication.DLQWriter, commandHandlerRegistry *workflow.CommandHandlerRegistry, ) shard.Engine
NewEngineWithShardContext creates an instance of history engine
func NewHostRateLimiterRateFn ¶ added in v1.18.0
func NewHostRateLimiterRateFn( hostRPS dynamicconfig.IntPropertyFn, persistenceMaxRPS dynamicconfig.IntPropertyFn, persistenceMaxRPSRatio float64, ) quotas.RateFn
func NewWorkflowRebuilder ¶ added in v1.16.0
func PersistenceRateLimitingParamsProvider ¶ added in v1.17.2
func PersistenceRateLimitingParamsProvider( serviceConfig *configs.Config, persistenceLazyLoadedServiceResolver service.PersistenceLazyLoadedServiceResolver, ownershipBasedQuotaScaler shard.LazyLoadedOwnershipBasedQuotaScaler, logger log.SnTaggedLogger, ) service.PersistenceRateLimitingParams
func QueueFactoryLifetimeHooks ¶ added in v1.17.3
func QueueFactoryLifetimeHooks( params QueueFactoriesLifetimeHookParams, )
func QueueSchedulerRateLimiterProvider ¶ added in v1.19.0
func QueueSchedulerRateLimiterProvider( ownershipBasedQuotaScaler shard.LazyLoadedOwnershipBasedQuotaScaler, serviceResolver membership.ServiceResolver, config *configs.Config, timeSource clock.TimeSource, logger log.SnTaggedLogger, ) (queues.SchedulerRateLimiter, error)
func RateLimitInterceptorProvider ¶ added in v1.13.0
func RateLimitInterceptorProvider( serviceConfig *configs.Config, ) *interceptor.RateLimitInterceptor
func RetryableInterceptorProvider ¶ added in v1.17.3
func RetryableInterceptorProvider() *interceptor.RetryableInterceptor
func ServiceLifetimeHooks ¶ added in v1.13.0
func ServiceResolverProvider ¶ added in v1.14.0
func ServiceResolverProvider( membershipMonitor membership.Monitor, ) (membership.ServiceResolver, error)
func TelemetryInterceptorProvider ¶ added in v1.13.0
func TelemetryInterceptorProvider( logger log.Logger, namespaceRegistry namespace.Registry, metricsHandler metrics.Handler, ) *interceptor.TelemetryInterceptor
func ThrottledLoggerRpsFnProvider ¶ added in v1.13.0
func ThrottledLoggerRpsFnProvider(serviceConfig *configs.Config) resource.ThrottledLoggerRpsFn
func VisibilityManagerProvider ¶ added in v1.13.0
func VisibilityManagerProvider( logger log.Logger, metricsHandler metrics.Handler, persistenceConfig *config.Persistence, customVisibilityStoreFactory visibility.VisibilityStoreFactory, esProcessorConfig *elasticsearch.ProcessorConfig, serviceConfig *configs.Config, persistenceServiceResolver resolver.ServiceResolver, searchAttributesMapperProvider searchattribute.MapperProvider, saProvider searchattribute.Provider, namespaceRegistry namespace.Registry, ) (manager.VisibilityManager, error)
Types ¶
type ArchivalQueueFactoryParams ¶ added in v1.20.0
type ArchivalQueueFactoryParams struct { // fx.In allows fx to construct this object without an explicitly defined constructor. fx.In // QueueFactoryBaseParams contains common params for all queue factories. QueueFactoryBaseParams // Archiver is the archival client used to archive history events and visibility records. Archiver archival.Archiver // RelocatableAttributesFetcher is the client used to fetch the memo and search attributes of a workflow. RelocatableAttributesFetcher workflow.RelocatableAttributesFetcher }
ArchivalQueueFactoryParams contains the necessary params to create a new archival queue factory.
type Handler ¶
type Handler struct { historyservice.UnsafeHistoryServiceServer // contains filtered or unexported fields }
Handler - gRPC handler interface for historyservice
func HandlerProvider ¶ added in v1.14.0
func HandlerProvider(args NewHandlerArgs) *Handler
func (*Handler) AddTasks ¶ added in v1.23.0
func (h *Handler) AddTasks( ctx context.Context, request *historyservice.AddTasksRequest, ) (*historyservice.AddTasksResponse, error)
AddTasks calls the addtasks.Invoke API with a shard.Context for the given shardID.
func (*Handler) CloseShard ¶ added in v0.27.0
func (h *Handler) CloseShard(_ context.Context, request *historyservice.CloseShardRequest) (_ *historyservice.CloseShardResponse, retError error)
CloseShard closes a shard hosted by this instance
func (*Handler) CompleteNexusOperation ¶ added in v1.24.0
func (*Handler) DeleteDLQTasks ¶ added in v1.23.0
func (*Handler) DeleteWorkflowExecution ¶ added in v1.15.0
func (*Handler) DeleteWorkflowVisibilityRecord ¶ added in v1.17.0
func (*Handler) DescribeHistoryHost ¶ added in v0.3.13
func (h *Handler) DescribeHistoryHost(_ context.Context, _ *historyservice.DescribeHistoryHostRequest) (_ *historyservice.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 *historyservice.DescribeMutableStateRequest) (_ *historyservice.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 *historyservice.DescribeWorkflowExecutionRequest) (_ *historyservice.DescribeWorkflowExecutionResponse, retError error)
DescribeWorkflowExecution returns information about the specified workflow execution.
func (*Handler) ExecuteMultiOperation ¶ added in v1.24.0
func (*Handler) ForceDeleteWorkflowExecution ¶ added in v1.23.0
func (*Handler) GenerateLastHistoryReplicationTasks ¶ added in v1.14.0
func (*Handler) GetDLQMessages ¶ added in v0.27.0
func (*Handler) GetDLQReplicationMessages ¶ added in v0.27.0
func (h *Handler) GetDLQReplicationMessages(ctx context.Context, request *historyservice.GetDLQReplicationMessagesRequest) (_ *historyservice.GetDLQReplicationMessagesResponse, retError error)
GetDLQReplicationMessages is called by remote peers to get replicated messages for DLQ merging
func (*Handler) GetDLQTasks ¶ added in v1.23.0
func (*Handler) GetMutableState ¶ added in v0.3.5
func (h *Handler) GetMutableState(ctx context.Context, request *historyservice.GetMutableStateRequest) (_ *historyservice.GetMutableStateResponse, retError error)
GetMutableState - returns the id of the next event in the execution's history
func (*Handler) GetReplicationMessages ¶ added in v0.27.0
func (h *Handler) GetReplicationMessages(ctx context.Context, request *historyservice.GetReplicationMessagesRequest) (_ *historyservice.GetReplicationMessagesResponse, retError error)
GetReplicationMessages is called by remote peers to get replicated messages for cross DC replication
func (*Handler) GetReplicationStatus ¶ added in v1.14.0
func (*Handler) GetShard ¶ added in v1.14.0
func (h *Handler) GetShard(ctx context.Context, request *historyservice.GetShardRequest) (_ *historyservice.GetShardResponse, retError error)
GetShard gets a shard hosted by this instance
func (*Handler) GetWorkflowExecutionHistory ¶ added in v1.23.0
func (*Handler) GetWorkflowExecutionHistoryReverse ¶ added in v1.23.0
func (*Handler) GetWorkflowExecutionRawHistory ¶ added in v1.24.0
func (*Handler) GetWorkflowExecutionRawHistoryV2 ¶ added in v1.23.0
func (*Handler) ImportWorkflowExecution ¶ added in v1.23.0
func (h *Handler) ImportWorkflowExecution(ctx context.Context, request *historyservice.ImportWorkflowExecutionRequest) (_ *historyservice.ImportWorkflowExecutionResponse, retError error)
ImportWorkflowExecution attempts to workflow execution according to persisted history events
func (*Handler) IsActivityTaskValid ¶ added in v1.22.0
func (h *Handler) IsActivityTaskValid(ctx context.Context, request *historyservice.IsActivityTaskValidRequest) (_ *historyservice.IsActivityTaskValidResponse, retError error)
IsActivityTaskValid - whether activity task is still valid
func (*Handler) IsWorkflowTaskValid ¶ added in v1.22.0
func (h *Handler) IsWorkflowTaskValid(ctx context.Context, request *historyservice.IsWorkflowTaskValidRequest) (_ *historyservice.IsWorkflowTaskValidResponse, retError error)
IsWorkflowTaskValid - whether workflow task is still valid
func (*Handler) ListQueues ¶ added in v1.23.0
func (*Handler) MergeDLQMessages ¶ added in v0.27.0
func (*Handler) PollMutableState ¶ added in v0.27.0
func (h *Handler) PollMutableState(ctx context.Context, request *historyservice.PollMutableStateRequest) (_ *historyservice.PollMutableStateResponse, retError error)
PollMutableState - returns the id of the next event in the execution's history
func (*Handler) PollWorkflowExecutionUpdate ¶ added in v1.21.0
func (*Handler) PurgeDLQMessages ¶ added in v0.27.0
func (*Handler) QueryWorkflow ¶ added in v0.27.0
func (h *Handler) QueryWorkflow(ctx context.Context, request *historyservice.QueryWorkflowRequest) (_ *historyservice.QueryWorkflowResponse, retError error)
QueryWorkflow queries a workflow.
func (*Handler) ReapplyEvents ¶ added in v0.27.0
func (h *Handler) ReapplyEvents(ctx context.Context, request *historyservice.ReapplyEventsRequest) (_ *historyservice.ReapplyEventsResponse, retError error)
ReapplyEvents applies stale events to the current workflow and the current run
func (*Handler) RebuildMutableState ¶ added in v1.16.0
func (h *Handler) RebuildMutableState(ctx context.Context, request *historyservice.RebuildMutableStateRequest) (_ *historyservice.RebuildMutableStateResponse, retError error)
RebuildMutableState attempts to rebuild mutable state according to persisted history events
func (*Handler) RecordActivityTaskHeartbeat ¶
func (*Handler) RecordActivityTaskStarted ¶
func (h *Handler) RecordActivityTaskStarted(ctx context.Context, request *historyservice.RecordActivityTaskStartedRequest) (_ *historyservice.RecordActivityTaskStartedResponse, retError error)
RecordActivityTaskStarted - Record Activity Task started.
func (*Handler) RecordChildExecutionCompleted ¶
func (h *Handler) RecordChildExecutionCompleted(ctx context.Context, request *historyservice.RecordChildExecutionCompletedRequest) (_ *historyservice.RecordChildExecutionCompletedResponse, 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) RecordWorkflowTaskStarted ¶ added in v0.27.0
func (h *Handler) RecordWorkflowTaskStarted(ctx context.Context, request *historyservice.RecordWorkflowTaskStartedRequest) (_ *historyservice.RecordWorkflowTaskStartedResponse, retError error)
RecordWorkflowTaskStarted - Record Workflow Task started.
func (*Handler) RefreshWorkflowTasks ¶ added in v0.27.0
func (*Handler) RemoveSignalMutableState ¶ added in v0.3.6
func (h *Handler) RemoveSignalMutableState(ctx context.Context, request *historyservice.RemoveSignalMutableStateRequest) (_ *historyservice.RemoveSignalMutableStateResponse, 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 workflow task finished.
func (*Handler) RemoveTask ¶ added in v0.27.0
func (h *Handler) RemoveTask(ctx context.Context, request *historyservice.RemoveTaskRequest) (_ *historyservice.RemoveTaskResponse, retError error)
RemoveTask returns information about the internal states of a history host
func (*Handler) ReplicateEventsV2 ¶ added in v0.27.0
func (h *Handler) ReplicateEventsV2(ctx context.Context, request *historyservice.ReplicateEventsV2Request) (_ *historyservice.ReplicateEventsV2Response, retError error)
ReplicateEventsV2 is called by processor to replicate history events for passive namespaces
func (*Handler) ReplicateWorkflowState ¶ added in v1.20.0
func (h *Handler) ReplicateWorkflowState( ctx context.Context, request *historyservice.ReplicateWorkflowStateRequest, ) (_ *historyservice.ReplicateWorkflowStateResponse, retError error)
ReplicateWorkflowState is called by processor to replicate workflow state for passive namespaces
func (*Handler) RequestCancelWorkflowExecution ¶
func (h *Handler) RequestCancelWorkflowExecution(ctx context.Context, request *historyservice.RequestCancelWorkflowExecutionRequest) (_ *historyservice.RequestCancelWorkflowExecutionResponse, retError error)
RequestCancelWorkflowExecution - requests cancellation of a workflow
func (*Handler) ResetStickyTaskQueue ¶ added in v0.27.0
func (h *Handler) ResetStickyTaskQueue(ctx context.Context, request *historyservice.ResetStickyTaskQueueRequest) (_ *historyservice.ResetStickyTaskQueueResponse, retError error)
ResetStickyTaskQueue reset the volatile information in mutable state of a given workflow. Volatile information are the information related to client, such as: 1. StickyTaskQueue 2. StickyScheduleToStartTimeout
func (*Handler) ResetWorkflowExecution ¶ added in v0.5.2
func (h *Handler) ResetWorkflowExecution(ctx context.Context, request *historyservice.ResetWorkflowExecutionRequest) (_ *historyservice.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, request *historyservice.RespondActivityTaskCanceledRequest) (_ *historyservice.RespondActivityTaskCanceledResponse, retError error)
RespondActivityTaskCanceled - records failure of an activity task
func (*Handler) RespondActivityTaskCompleted ¶
func (h *Handler) RespondActivityTaskCompleted(ctx context.Context, request *historyservice.RespondActivityTaskCompletedRequest) (_ *historyservice.RespondActivityTaskCompletedResponse, retError error)
RespondActivityTaskCompleted - records completion of an activity task
func (*Handler) RespondActivityTaskFailed ¶
func (h *Handler) RespondActivityTaskFailed(ctx context.Context, request *historyservice.RespondActivityTaskFailedRequest) (_ *historyservice.RespondActivityTaskFailedResponse, retError error)
RespondActivityTaskFailed - records failure of an activity task
func (*Handler) RespondWorkflowTaskCompleted ¶ added in v0.27.0
func (h *Handler) RespondWorkflowTaskCompleted(ctx context.Context, request *historyservice.RespondWorkflowTaskCompletedRequest) (_ *historyservice.RespondWorkflowTaskCompletedResponse, retError error)
RespondWorkflowTaskCompleted - records completion of a workflow task
func (*Handler) RespondWorkflowTaskFailed ¶ added in v0.27.0
func (h *Handler) RespondWorkflowTaskFailed(ctx context.Context, request *historyservice.RespondWorkflowTaskFailedRequest) (_ *historyservice.RespondWorkflowTaskFailedResponse, retError error)
RespondWorkflowTaskFailed - failed response to workflow task
func (*Handler) ScheduleWorkflowTask ¶ added in v0.27.0
func (h *Handler) ScheduleWorkflowTask(ctx context.Context, request *historyservice.ScheduleWorkflowTaskRequest) (_ *historyservice.ScheduleWorkflowTaskResponse, retError error)
ScheduleWorkflowTask is used for creating a workflow 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 workflow 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, request *historyservice.SignalWithStartWorkflowExecutionRequest) (_ *historyservice.SignalWithStartWorkflowExecutionResponse, 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 workflow 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 workflow task being created for the execution
func (*Handler) SignalWorkflowExecution ¶
func (h *Handler) SignalWorkflowExecution(ctx context.Context, request *historyservice.SignalWorkflowExecutionRequest) (_ *historyservice.SignalWorkflowExecutionResponse, 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 workflow task being created for the execution.
func (*Handler) StartWorkflowExecution ¶
func (h *Handler) StartWorkflowExecution(ctx context.Context, request *historyservice.StartWorkflowExecutionRequest) (_ *historyservice.StartWorkflowExecutionResponse, retError error)
StartWorkflowExecution - creates a new workflow execution
func (*Handler) StreamWorkflowReplicationMessages ¶ added in v1.21.0
func (*Handler) SyncActivity ¶ added in v0.4.0
func (h *Handler) SyncActivity(ctx context.Context, request *historyservice.SyncActivityRequest) (_ *historyservice.SyncActivityResponse, 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, request *historyservice.SyncShardStatusRequest) (_ *historyservice.SyncShardStatusResponse, 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, request *historyservice.TerminateWorkflowExecutionRequest) (_ *historyservice.TerminateWorkflowExecutionResponse, retError error)
TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.
func (*Handler) UpdateWorkflowExecution ¶ added in v1.20.0
func (*Handler) VerifyChildExecutionCompletionRecorded ¶ added in v1.17.0
type HistoryEngineFactoryParams ¶ added in v1.16.0
type HistoryEngineFactoryParams struct { fx.In ClientBean client.Bean MatchingClient resource.MatchingClient SdkClientFactory sdk.ClientFactory EventNotifier events.Notifier Config *configs.Config RawMatchingClient resource.MatchingRawClient WorkflowCache wcache.Cache NewCacheFn wcache.NewCacheFn EventSerializer serialization.Serializer QueueFactories []QueueFactory `group:"queueFactory"` ReplicationTaskFetcherFactory replication.TaskFetcherFactory ReplicationTaskExecutorProvider replication.TaskExecutorProvider TracerProvider trace.TracerProvider PersistenceVisibilityMgr manager.VisibilityManager EventBlobCache persistence.XDCCache TaskCategoryRegistry tasks.TaskCategoryRegistry ReplicationDLQWriter replication.DLQWriter CommandHandlerRegistry *workflow.CommandHandlerRegistry }
type MockworkflowRebuilder ¶ added in v1.19.0
type MockworkflowRebuilder struct {
// contains filtered or unexported fields
}
MockworkflowRebuilder is a mock of workflowRebuilder interface.
func NewMockworkflowRebuilder ¶ added in v1.19.0
func NewMockworkflowRebuilder(ctrl *gomock.Controller) *MockworkflowRebuilder
NewMockworkflowRebuilder creates a new mock instance.
func (*MockworkflowRebuilder) EXPECT ¶ added in v1.19.0
func (m *MockworkflowRebuilder) EXPECT() *MockworkflowRebuilderMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MockworkflowRebuilderMockRecorder ¶ added in v1.19.0
type MockworkflowRebuilderMockRecorder struct {
// contains filtered or unexported fields
}
MockworkflowRebuilderMockRecorder is the mock recorder for MockworkflowRebuilder.
type NewHandlerArgs ¶ added in v1.14.0
type NewHandlerArgs struct { fx.In Config *configs.Config Logger log.SnTaggedLogger ThrottledLogger log.ThrottledLogger PersistenceExecutionManager persistence.ExecutionManager PersistenceShardManager persistence.ShardManager PersistenceVisibilityManager manager.VisibilityManager HistoryServiceResolver membership.ServiceResolver MetricsHandler metrics.Handler PayloadSerializer serialization.Serializer TimeSource clock.TimeSource NamespaceRegistry namespace.Registry SaProvider searchattribute.Provider ClusterMetadata cluster.Metadata ArchivalMetadata archiver.ArchivalMetadata HostInfoProvider membership.HostInfoProvider ShardController shard.Controller EventNotifier events.Notifier TracerProvider trace.TracerProvider TaskQueueManager persistence.HistoryTaskQueueManager TaskCategoryRegistry tasks.TaskCategoryRegistry DLQMetricsEmitter *persistence.DLQMetricsEmitter ReplicationTaskFetcherFactory replication.TaskFetcherFactory ReplicationTaskConverterFactory replication.SourceTaskConverterProvider StreamReceiverMonitor replication.StreamReceiverMonitor }
type QueueFactoriesLifetimeHookParams ¶ added in v1.17.3
type QueueFactoriesLifetimeHookParams struct { fx.In Lifecycle fx.Lifecycle Factories []QueueFactory `group:"queueFactory"` }
type QueueFactory ¶ added in v1.18.0
type QueueFactory interface { Start() Stop() // TODO: // 1. Remove the cache parameter after workflow cache become a host level component // and it can be provided as a parameter when creating a QueueFactory instance. // Currently, workflow cache is shard level, but we can't get it from shard or engine interface, // as that will lead to a cycle dependency issue between shard and workflow package. // 2. Move this interface to queues package after 1 is done so that there's no cycle dependency // between workflow and queues package. CreateQueue(shard shard.Context, cache wcache.Cache) queues.Queue }
func NewArchivalQueueFactory ¶ added in v1.20.0
func NewArchivalQueueFactory( params ArchivalQueueFactoryParams, ) QueueFactory
NewArchivalQueueFactory creates a new QueueFactory to construct archival queues.
func NewMemoryScheduledQueueFactory ¶ added in v1.21.0
func NewMemoryScheduledQueueFactory( params memoryScheduledQueueFactoryParams, ) QueueFactory
func NewOutboundQueueFactory ¶ added in v1.24.0
func NewOutboundQueueFactory(params outboundQueueFactoryParams) QueueFactory
func NewTimerQueueFactory ¶ added in v1.17.3
func NewTimerQueueFactory( params timerQueueFactoryParams, ) QueueFactory
func NewTransferQueueFactory ¶ added in v1.17.3
func NewTransferQueueFactory( params transferQueueFactoryParams, ) QueueFactory
func NewVisibilityQueueFactory ¶ added in v1.17.3
func NewVisibilityQueueFactory( params visibilityQueueFactoryParams, ) QueueFactory
type QueueFactoryBase ¶ added in v1.18.0
type QueueFactoryBase struct { HostScheduler queues.Scheduler HostPriorityAssigner queues.PriorityAssigner HostReaderRateLimiter quotas.RequestRateLimiter }
func (*QueueFactoryBase) Start ¶ added in v1.18.0
func (f *QueueFactoryBase) Start()
func (*QueueFactoryBase) Stop ¶ added in v1.18.0
func (f *QueueFactoryBase) Stop()
type QueueFactoryBaseParams ¶ added in v1.18.0
type QueueFactoryBaseParams struct { fx.In NamespaceRegistry namespace.Registry ClusterMetadata cluster.Metadata Config *configs.Config TimeSource clock.TimeSource MetricsHandler metrics.Handler Logger log.SnTaggedLogger SchedulerRateLimiter queues.SchedulerRateLimiter DLQWriter *queues.DLQWriter ExecutorWrapper queues.ExecutorWrapper `optional:"true"` }
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents the history service
func NewService ¶
func NewService( grpcServerOptions []grpc.ServerOption, serviceConfig *configs.Config, visibilityMgr manager.VisibilityManager, handler *Handler, logger log.Logger, grpcListener net.Listener, membershipMonitor membership.Monitor, metricsHandler metrics.Handler, healthServer *health.Server, ) *Service
func ServiceProvider ¶ added in v1.14.0
func ServiceProvider( grpcServerOptions []grpc.ServerOption, serviceConfig *configs.Config, visibilityMgr manager.VisibilityManager, handler *Handler, logger log.SnTaggedLogger, grpcListener net.Listener, membershipMonitor membership.Monitor, metricsHandler metrics.Handler, healthServer *health.Server, ) *Service
Source Files ¶
- archival_queue_factory.go
- archival_queue_task_executor.go
- fx.go
- handler.go
- history_engine.go
- history_engine_factory.go
- memory_scheduled_queue_factory.go
- ndc_standby_task_util.go
- ndc_task_util.go
- outbound_queue_active_task_executor.go
- outbound_queue_factory.go
- outbound_queue_standby_task_executor.go
- queue_factory_base.go
- service.go
- statemachine_environment.go
- timer_queue_active_task_executor.go
- timer_queue_factory.go
- timer_queue_standby_task_executor.go
- timer_queue_task_executor_base.go
- transfer_queue_active_task_executor.go
- transfer_queue_factory.go
- transfer_queue_standby_task_executor.go
- transfer_queue_task_executor_base.go
- visibility_queue_factory.go
- visibility_queue_task_executor.go
- worker_versioning_util.go
- workflow_rebuilder.go
- workflow_rebuilder_mock.go
Directories ¶
Path | Synopsis |
---|---|
getdlqtasks
Package getdlqtasks contains the logic to implement the [historyservice.HistoryServiceServer.GetDLQTasks] API.
|
Package getdlqtasks contains the logic to implement the [historyservice.HistoryServiceServer.GetDLQTasks] API. |
Package archival is a generated GoMock package.
|
Package archival is a generated GoMock package. |
Package deletemanager is a generated GoMock package.
|
Package deletemanager is a generated GoMock package. |
Package events is a generated GoMock package.
|
Package events is a generated GoMock package. |
Package ndc is a generated GoMock package.
|
Package ndc is a generated GoMock package. |
Package queues is a generated GoMock package.
|
Package queues is a generated GoMock package. |
Package replication is a generated GoMock package.
|
Package replication is a generated GoMock package. |
eventhandler
Package eventhandler is a generated GoMock package.
|
Package eventhandler is a generated GoMock package. |
Package shard is a generated GoMock package.
|
Package shard is a generated GoMock package. |
Package tasks is a generated GoMock package.
|
Package tasks is a generated GoMock package. |
Package workflow is a generated GoMock package.
|
Package workflow is a generated GoMock package. |
cache
Package cache is a generated GoMock package.
|
Package cache is a generated GoMock package. |