Documentation
¶
Overview ¶
Package matching is a generated GoMock package.
Package matching is a generated GoMock package.
nolint:forbidigo,panic // panic for unused metric handler methods
Package matching is a generated GoMock package.
Package matching is a generated GoMock package.
Package matching is a generated GoMock package.
Package matching is a generated GoMock package.
Index ¶
- Variables
- func AddCompatibleRedirectRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func CleanupRuleTombstones(versioningData *persistencespb.VersioningData, retentionTime time.Duration) *persistencespb.VersioningData
- func ClearTombstones(versioningData *persistencespb.VersioningData) *persistencespb.VersioningData
- func CommitBuildID(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func ContextMetadataInterceptorProvider(logger log.Logger) *interceptor.ContextMetadataInterceptor
- func DeleteAssignmentRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func DeleteCompatibleRedirectRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func ErrorHandlerProvider(logger log.Logger, serviceConfig *Config) *interceptor.RequestErrorHandler
- func FindAssignmentBuildId(rules []*persistencespb.AssignmentRule, runId string) string
- func FindRedirectBuildId(sourceBuildId string, rules []*persistencespb.RedirectRule) string
- func ForwardPollWithTarget(ctx context.Context, pollMetadata *pollMetadata, ...) (*internalTask, error)
- func GetBuildIdDeltas(prev *persistencespb.VersioningData, curr *persistencespb.VersioningData) (added []string, removed []string)
- func GetTimestampedWorkerVersioningRules(versioningData *persistencespb.VersioningData, clk *hlc.Clock) (*matchingservice.GetWorkerVersioningRulesResponse, error)
- func InsertAssignmentRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func IsTaskExpired(t *persistencespb.AllocatedTaskInfo) bool
- func MergeVersioningData(a *persistencespb.VersioningData, b *persistencespb.VersioningData) *persistencespb.VersioningData
- func NamespaceRateLimitInterceptorProvider(serviceConfig *Config, namespaceRegistry namespace.Registry, ...) interceptor.NamespaceRateLimitInterceptor
- func PersistUnknownBuildId(clock *hlc.Clock, data *persistencespb.VersioningData, buildId string) *persistencespb.VersioningData
- func PersistenceRateLimitingParamsProvider(serviceConfig *Config, ...) service.PersistenceRateLimitingParams
- func RateLimitInterceptorProvider(serviceConfig *Config) *interceptor.RateLimitInterceptor
- func RemoveBuildIds(clock *hlc.Clock, versioningData *persistencespb.VersioningData, ...) *persistencespb.VersioningData
- func ReplaceAssignmentRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func ReplaceCompatibleRedirectRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func RetryableInterceptorProvider() *interceptor.RetryableInterceptor
- func ServerProvider(grpcServerOptions []grpc.ServerOption) *grpc.Server
- func ServiceErrorInterceptorProvider(dc *dynamicconfig.Collection, metricsHandler metrics.Handler, ...) *interceptor.ServiceErrorInterceptor
- 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 *Config) resource.ThrottledLoggerRpsFn
- func ToBuildIdOrderingResponse(data *persistencespb.VersioningData, maxSets int) *workflowservice.GetWorkerBuildIdCompatibilityResponse
- func UpdateVersionSets(clock *hlc.Clock, data *persistencespb.VersioningData, ...) (*persistencespb.VersioningData, error)
- func VisibilityManagerProvider(logger log.Logger, persistenceConfig *config.Persistence, ...) (manager.VisibilityManager, error)
- func WorkersRegistryProvider(lc fx.Lifecycle, metricsHandler metrics.Handler, serviceConfig *Config) workers.Registry
- type Config
- type Engine
- type EphemeralDataChangeFunc
- type Forwarder
- func (fwdr *Forwarder) AddReqTokenC() <-chan *ForwarderReqToken
- func (fwdr *Forwarder) ForwardNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)
- func (fwdr *Forwarder) ForwardPoll(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
- func (fwdr *Forwarder) ForwardQueryTask(ctx context.Context, task *internalTask) (*matchingservice.QueryWorkflowResponse, error)
- func (fwdr *Forwarder) ForwardTask(ctx context.Context, task *internalTask) error
- func (fwdr *Forwarder) PollReqTokenC() <-chan *ForwarderReqToken
- type ForwarderReqToken
- type Handler
- func (h *Handler) AddActivityTask(ctx context.Context, request *matchingservice.AddActivityTaskRequest) (_ *matchingservice.AddActivityTaskResponse, retError error)
- func (h *Handler) AddWorkflowTask(ctx context.Context, request *matchingservice.AddWorkflowTaskRequest) (_ *matchingservice.AddWorkflowTaskResponse, retError error)
- func (h *Handler) ApplyTaskQueueUserDataReplicationEvent(ctx context.Context, ...) (_ *matchingservice.ApplyTaskQueueUserDataReplicationEventResponse, ...)
- func (h *Handler) CancelOutstandingPoll(ctx context.Context, request *matchingservice.CancelOutstandingPollRequest) (_ *matchingservice.CancelOutstandingPollResponse, retError error)
- func (h *Handler) CancelOutstandingWorkerPolls(ctx context.Context, ...) (_ *matchingservice.CancelOutstandingWorkerPollsResponse, retError error)
- func (h *Handler) CancelOutstandingWorkerPollsPartition(ctx context.Context, ...) (_ *matchingservice.CancelOutstandingWorkerPollsPartitionResponse, ...)
- func (h *Handler) CheckTaskQueueUserDataPropagation(ctx context.Context, ...) (_ *matchingservice.CheckTaskQueueUserDataPropagationResponse, retError error)
- func (h *Handler) CheckTaskQueueVersionMembership(ctx context.Context, ...) (_ *matchingservice.CheckTaskQueueVersionMembershipResponse, retError error)
- func (h *Handler) CountWorkers(_ context.Context, request *matchingservice.CountWorkersRequest) (_ *matchingservice.CountWorkersResponse, retError error)
- func (h *Handler) CreateNexusEndpoint(ctx context.Context, request *matchingservice.CreateNexusEndpointRequest) (_ *matchingservice.CreateNexusEndpointResponse, retError error)
- func (h *Handler) DeleteNexusEndpoint(ctx context.Context, request *matchingservice.DeleteNexusEndpointRequest) (_ *matchingservice.DeleteNexusEndpointResponse, retError error)
- func (h *Handler) DescribeTaskQueue(ctx context.Context, request *matchingservice.DescribeTaskQueueRequest) (_ *matchingservice.DescribeTaskQueueResponse, retError error)
- func (h *Handler) DescribeTaskQueuePartition(ctx context.Context, ...) (_ *matchingservice.DescribeTaskQueuePartitionResponse, retError error)
- func (h *Handler) DescribeVersionedTaskQueues(ctx context.Context, ...) (_ *matchingservice.DescribeVersionedTaskQueuesResponse, retError error)
- func (h *Handler) DescribeWorker(_ context.Context, request *matchingservice.DescribeWorkerRequest) (_ *matchingservice.DescribeWorkerResponse, retError error)
- func (h *Handler) DispatchNexusTask(ctx context.Context, request *matchingservice.DispatchNexusTaskRequest) (_ *matchingservice.DispatchNexusTaskResponse, retError error)
- func (h *Handler) ForceLoadTaskQueuePartition(ctx context.Context, ...) (_ *matchingservice.ForceLoadTaskQueuePartitionResponse, retError error)
- func (h *Handler) ForceUnloadTaskQueue(ctx context.Context, request *matchingservice.ForceUnloadTaskQueueRequest) (_ *matchingservice.ForceUnloadTaskQueueResponse, retError error)
- func (h *Handler) ForceUnloadTaskQueuePartition(ctx context.Context, ...) (_ *matchingservice.ForceUnloadTaskQueuePartitionResponse, retError error)
- func (h *Handler) GetBuildIdTaskQueueMapping(ctx context.Context, ...) (_ *matchingservice.GetBuildIdTaskQueueMappingResponse, retError error)
- func (h *Handler) GetTaskQueueUserData(ctx context.Context, request *matchingservice.GetTaskQueueUserDataRequest) (_ *matchingservice.GetTaskQueueUserDataResponse, retError error)
- func (h *Handler) GetWorkerBuildIdCompatibility(ctx context.Context, ...) (_ *matchingservice.GetWorkerBuildIdCompatibilityResponse, retError error)
- func (h *Handler) GetWorkerVersioningRules(ctx context.Context, request *matchingservice.GetWorkerVersioningRulesRequest) (_ *matchingservice.GetWorkerVersioningRulesResponse, retError error)
- func (h *Handler) ListNexusEndpoints(ctx context.Context, request *matchingservice.ListNexusEndpointsRequest) (_ *matchingservice.ListNexusEndpointsResponse, retError error)
- func (h *Handler) ListTaskQueuePartitions(ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest) (_ *matchingservice.ListTaskQueuePartitionsResponse, retError error)
- func (h *Handler) ListWorkers(_ context.Context, request *matchingservice.ListWorkersRequest) (_ *matchingservice.ListWorkersResponse, retError error)
- func (h *Handler) PollActivityTaskQueue(ctx context.Context, request *matchingservice.PollActivityTaskQueueRequest) (_ *matchingservice.PollActivityTaskQueueResponse, retError error)
- func (h *Handler) PollNexusTaskQueue(ctx context.Context, request *matchingservice.PollNexusTaskQueueRequest) (_ *matchingservice.PollNexusTaskQueueResponse, retError error)
- func (h *Handler) PollWorkflowTaskQueue(ctx context.Context, request *matchingservice.PollWorkflowTaskQueueRequest) (_ *matchingservice.PollWorkflowTaskQueueResponseWithRawHistory, retError error)
- func (h *Handler) QueryWorkflow(ctx context.Context, request *matchingservice.QueryWorkflowRequest) (_ *matchingservice.QueryWorkflowResponse, retError error)
- func (h *Handler) RecordWorkerHeartbeat(ctx context.Context, request *matchingservice.RecordWorkerHeartbeatRequest) (_ *matchingservice.RecordWorkerHeartbeatResponse, retError error)
- func (h *Handler) ReplicateTaskQueueUserData(ctx context.Context, ...) (_ *matchingservice.ReplicateTaskQueueUserDataResponse, retError error)
- func (h *Handler) RespondNexusTaskCompleted(ctx context.Context, request *matchingservice.RespondNexusTaskCompletedRequest) (_ *matchingservice.RespondNexusTaskCompletedResponse, retError error)
- func (h *Handler) RespondNexusTaskFailed(ctx context.Context, request *matchingservice.RespondNexusTaskFailedRequest) (_ *matchingservice.RespondNexusTaskFailedResponse, retError error)
- func (h *Handler) RespondQueryTaskCompleted(ctx context.Context, request *matchingservice.RespondQueryTaskCompletedRequest) (_ *matchingservice.RespondQueryTaskCompletedResponse, retError error)
- func (h *Handler) Start()
- func (h *Handler) Stop()
- func (h *Handler) SyncDeploymentUserData(ctx context.Context, request *matchingservice.SyncDeploymentUserDataRequest) (_ *matchingservice.SyncDeploymentUserDataResponse, retError error)
- func (h *Handler) UpdateFairnessState(ctx context.Context, request *matchingservice.UpdateFairnessStateRequest) (_ *matchingservice.UpdateFairnessStateResponse, retError error)
- func (h *Handler) UpdateNexusEndpoint(ctx context.Context, request *matchingservice.UpdateNexusEndpointRequest) (_ *matchingservice.UpdateNexusEndpointResponse, retError error)
- func (h *Handler) UpdateTaskQueueConfig(ctx context.Context, request *matchingservice.UpdateTaskQueueConfigRequest) (_ *matchingservice.UpdateTaskQueueConfigResponse, retError error)
- func (h *Handler) UpdateTaskQueueUserData(ctx context.Context, request *matchingservice.UpdateTaskQueueUserDataRequest) (_ *matchingservice.UpdateTaskQueueUserDataResponse, retError error)
- func (h *Handler) UpdateWorkerBuildIdCompatibility(ctx context.Context, ...) (_ *matchingservice.UpdateWorkerBuildIdCompatibilityResponse, retError error)
- func (h *Handler) UpdateWorkerVersioningRules(ctx context.Context, ...) (_ *matchingservice.UpdateWorkerVersioningRulesResponse, retError error)
- type HandlerParams
- type MockPartitionScaler
- type MockPartitionScalerFactory
- type MockPartitionScalerFactoryMockRecorder
- type MockPartitionScalerMockRecorder
- type MockphysicalTaskQueueManager
- func (m *MockphysicalTaskQueueManager) AddSpooledTask(task *internalTask) error
- func (m *MockphysicalTaskQueueManager) AddSpooledTaskToMatcher(task *internalTask) error
- func (m *MockphysicalTaskQueueManager) DispatchNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)
- func (m *MockphysicalTaskQueueManager) DispatchQueryTask(ctx context.Context, task *internalTask) (*matchingservice.QueryWorkflowResponse, error)
- func (m *MockphysicalTaskQueueManager) DispatchSpooledTask(ctx context.Context, task *internalTask, userDataChanged <-chan struct{}) error
- func (m *MockphysicalTaskQueueManager) EXPECT() *MockphysicalTaskQueueManagerMockRecorder
- func (m *MockphysicalTaskQueueManager) FinishedDraining()
- func (m *MockphysicalTaskQueueManager) GetAllPollerInfo() []*taskqueue.PollerInfo
- func (m *MockphysicalTaskQueueManager) GetFairnessWeightOverrides() fairnessWeightOverrides
- func (m *MockphysicalTaskQueueManager) GetInternalTaskQueueStatus() []*taskqueue0.InternalTaskQueueStatus
- func (m *MockphysicalTaskQueueManager) GetStatsByPriority(includeRates bool) map[int32]*taskqueue.TaskQueueStats
- func (m *MockphysicalTaskQueueManager) HasPollerAfter(accessTime time.Time) bool
- func (m *MockphysicalTaskQueueManager) LegacyDescribeTaskQueue(includeTaskQueueStatus bool) *matchingservice.DescribeTaskQueueResponse
- func (m *MockphysicalTaskQueueManager) MakePollerScalingDecision(ctx context.Context, pollStartTime time.Time) *taskqueue.PollerScalingDecision
- func (m *MockphysicalTaskQueueManager) MarkAlive()
- func (m *MockphysicalTaskQueueManager) PollTask(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
- func (m *MockphysicalTaskQueueManager) ProcessSpooledTask(ctx context.Context, task *internalTask) error
- func (m *MockphysicalTaskQueueManager) QueueKey() *PhysicalTaskQueueKey
- func (m *MockphysicalTaskQueueManager) RecordTaskAdd(result string, forwarded bool, behavior enums.VersioningBehavior)
- func (m *MockphysicalTaskQueueManager) RemovePoller(arg0 pollerIdentity)
- func (m *MockphysicalTaskQueueManager) ReprocessRedirectedTasksAfterStop()
- func (m *MockphysicalTaskQueueManager) SetupDraining()
- func (m *MockphysicalTaskQueueManager) SpoolTask(taskInfo *persistence.TaskInfo) error
- func (m *MockphysicalTaskQueueManager) Start()
- func (m *MockphysicalTaskQueueManager) StartScaleManager(arg0 *persistence.PartitionScaleState)
- func (m *MockphysicalTaskQueueManager) Stop(arg0 unloadCause)
- func (m *MockphysicalTaskQueueManager) TrySyncMatch(ctx context.Context, task *internalTask) (syncMatchOutcome, error)
- func (m *MockphysicalTaskQueueManager) UnloadFromPartitionManager(arg0 unloadCause)
- func (m *MockphysicalTaskQueueManager) UpdatePollerInfo(arg0 pollerIdentity, arg1 *pollMetadata)
- func (m *MockphysicalTaskQueueManager) UpdateRemotePriorityBacklogs(arg0 remotePriorityBacklogSet)
- func (m *MockphysicalTaskQueueManager) UpdateScaleState(arg0 *persistence.PartitionScaleState, arg1 bool) error
- func (m *MockphysicalTaskQueueManager) UserDataChanged()
- func (m *MockphysicalTaskQueueManager) WaitUntilInitialized(arg0 context.Context) error
- type MockphysicalTaskQueueManagerMockRecorder
- func (mr *MockphysicalTaskQueueManagerMockRecorder) AddSpooledTask(task any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) AddSpooledTaskToMatcher(task any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchNexusTask(ctx, task any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchQueryTask(ctx, task any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchSpooledTask(ctx, task, userDataChanged any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) FinishedDraining() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) GetAllPollerInfo() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) GetFairnessWeightOverrides() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) GetInternalTaskQueueStatus() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) GetStatsByPriority(includeRates any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) HasPollerAfter(accessTime any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) LegacyDescribeTaskQueue(includeTaskQueueStatus any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) MakePollerScalingDecision(ctx, pollStartTime any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) MarkAlive() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) PollTask(ctx, pollMetadata any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) ProcessSpooledTask(ctx, task any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) QueueKey() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) RecordTaskAdd(result, forwarded, behavior any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) RemovePoller(arg0 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) ReprocessRedirectedTasksAfterStop() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) SetupDraining() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) SpoolTask(taskInfo any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) Start() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) StartScaleManager(arg0 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) Stop(arg0 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) TrySyncMatch(ctx, task any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) UnloadFromPartitionManager(arg0 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdatePollerInfo(arg0, arg1 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdateRemotePriorityBacklogs(arg0 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdateScaleState(arg0, arg1 any) *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) UserDataChanged() *gomock.Call
- func (mr *MockphysicalTaskQueueManagerMockRecorder) WaitUntilInitialized(arg0 any) *gomock.Call
- type MockscaleDB
- type MockscaleDBMockRecorder
- type MocktaskQueuePartitionManager
- func (m *MocktaskQueuePartitionManager) AddSpooledTask(ctx context.Context, task *internalTask, backlogQueue *PhysicalTaskQueueKey) error
- func (m *MocktaskQueuePartitionManager) AddTask(ctx context.Context, params addTaskParams) (string, bool, error)
- func (m *MocktaskQueuePartitionManager) Describe(ctx context.Context, buildIds map[string]bool, ...) (*matchingservice.DescribeTaskQueuePartitionResponse, error)
- func (m *MocktaskQueuePartitionManager) DispatchNexusTask(ctx context.Context, taskId string, ...) (*matchingservice.DispatchNexusTaskResponse, error)
- func (m *MocktaskQueuePartitionManager) DispatchQueryTask(ctx context.Context, taskId string, ...) (*matchingservice.QueryWorkflowResponse, error)
- func (m *MocktaskQueuePartitionManager) EXPECT() *MocktaskQueuePartitionManagerMockRecorder
- func (m *MocktaskQueuePartitionManager) GetAllPollerInfo() []*taskqueue.PollerInfo
- func (m *MocktaskQueuePartitionManager) GetCache(key any) any
- func (m *MocktaskQueuePartitionManager) GetConfig() *taskQueueConfig
- func (m *MocktaskQueuePartitionManager) GetRateLimitManager() *rateLimitManager
- func (m *MocktaskQueuePartitionManager) GetUserDataManager() userDataManager
- func (m *MocktaskQueuePartitionManager) HasAnyPollerAfter(accessTime time.Time) bool
- func (m *MocktaskQueuePartitionManager) HasPollerAfter(buildId string, accessTime time.Time) bool
- func (m *MocktaskQueuePartitionManager) LegacyDescribeTaskQueue(includeTaskQueueStatus bool) (*matchingservice.DescribeTaskQueueResponse, error)
- func (m *MocktaskQueuePartitionManager) LongPollExpirationInterval() time.Duration
- func (m *MocktaskQueuePartitionManager) MarkAlive()
- func (m *MocktaskQueuePartitionManager) Namespace() *namespace.Namespace
- func (m *MocktaskQueuePartitionManager) Partition() tqid.Partition
- func (m *MocktaskQueuePartitionManager) PartitionCount() int
- func (m *MocktaskQueuePartitionManager) PollTask(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, bool, error)
- func (m *MocktaskQueuePartitionManager) ProcessSpooledTask(ctx context.Context, task *internalTask, backlogQueue *PhysicalTaskQueueKey) error
- func (m *MocktaskQueuePartitionManager) PutCache(key, value any)
- func (m *MocktaskQueuePartitionManager) RemovePoller(identity pollerIdentity)
- func (m *MocktaskQueuePartitionManager) Start()
- func (m *MocktaskQueuePartitionManager) Stop(arg0 unloadCause)
- func (m *MocktaskQueuePartitionManager) WaitUntilInitialized(arg0 context.Context) error
- type MocktaskQueuePartitionManagerMockRecorder
- func (mr *MocktaskQueuePartitionManagerMockRecorder) AddSpooledTask(ctx, task, backlogQueue any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) AddTask(ctx, params any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) Describe(ctx, buildIds, includeAllActive, reportStats, reportPollers, ... any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) DispatchNexusTask(ctx, taskId, request any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) DispatchQueryTask(ctx, taskId, request any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) GetAllPollerInfo() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) GetCache(key any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) GetConfig() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) GetRateLimitManager() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) GetUserDataManager() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) HasAnyPollerAfter(accessTime any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) HasPollerAfter(buildId, accessTime any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) LegacyDescribeTaskQueue(includeTaskQueueStatus any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) LongPollExpirationInterval() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) MarkAlive() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) Namespace() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) Partition() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) PartitionCount() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) PollTask(ctx, pollMetadata any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) ProcessSpooledTask(ctx, task, backlogQueue any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) PutCache(key, value any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) RemovePoller(identity any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) Start() *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) Stop(arg0 any) *gomock.Call
- func (mr *MocktaskQueuePartitionManagerMockRecorder) WaitUntilInitialized(arg0 any) *gomock.Call
- type MocktaskValidator
- type MocktaskValidatorMockRecorder
- type MockuserDataManager
- func (m *MockuserDataManager) CheckTaskQueueUserDataPropagation(arg0 context.Context, arg1 int64, arg2, arg3 int) error
- func (m *MockuserDataManager) EXPECT() *MockuserDataManagerMockRecorder
- func (m *MockuserDataManager) GetUserData() (*persistence.VersionedTaskQueueUserData, chan struct{}, error)
- func (m *MockuserDataManager) HandleGetUserDataRequest(ctx context.Context, req *matchingservice.GetTaskQueueUserDataRequest) (*matchingservice.GetTaskQueueUserDataResponse, error)
- func (m *MockuserDataManager) LocalBacklogPriorityChanged(arg0 map[PhysicalTaskQueueVersion]int64)
- func (m *MockuserDataManager) PartitionScale() *taskqueue.PartitionScaleInfo
- func (m *MockuserDataManager) SetPartitionScale(arg0 *taskqueue.PartitionScaleInfo)
- func (m *MockuserDataManager) Start()
- func (m *MockuserDataManager) Stop()
- func (m *MockuserDataManager) UpdateUserData(ctx context.Context, options UserDataUpdateOptions, ...) (int64, error)
- func (m *MockuserDataManager) WaitUntilInitialized(ctx context.Context) error
- type MockuserDataManagerMockRecorder
- func (mr *MockuserDataManagerMockRecorder) CheckTaskQueueUserDataPropagation(arg0, arg1, arg2, arg3 any) *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) GetUserData() *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) HandleGetUserDataRequest(ctx, req any) *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) LocalBacklogPriorityChanged(arg0 any) *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) PartitionScale() *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) SetPartitionScale(arg0 any) *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) Start() *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) Stop() *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) UpdateUserData(ctx, options, updateFn any) *gomock.Call
- func (mr *MockuserDataManagerMockRecorder) WaitUntilInitialized(ctx any) *gomock.Call
- type PartitionScaler
- type PartitionScalerDecision
- type PartitionScalerFactory
- type PartitionScalerInput
- type PhysicalTaskQueueKey
- func BuildIdQueueKey(p tqid.Partition, buildId string) *PhysicalTaskQueueKey
- func DeploymentQueueKey(p tqid.Partition, deployment *deploymentpb.Deployment) *PhysicalTaskQueueKey
- func UnversionedQueueKey(p tqid.Partition) *PhysicalTaskQueueKey
- func VersionSetQueueKey(p tqid.Partition, versionSet string) *PhysicalTaskQueueKey
- func (q *PhysicalTaskQueueKey) IsVersioned() bool
- func (q *PhysicalTaskQueueKey) NamespaceId() string
- func (q *PhysicalTaskQueueKey) Partition() tqid.Partition
- func (q *PhysicalTaskQueueKey) PersistenceName() string
- func (q *PhysicalTaskQueueKey) TaskQueueFamily() *tqid.TaskQueueFamily
- func (q *PhysicalTaskQueueKey) TaskType() enumspb.TaskQueueType
- func (q *PhysicalTaskQueueKey) Version() PhysicalTaskQueueVersion
- type PhysicalTaskQueueVersion
- func (v PhysicalTaskQueueVersion) BuildId() string
- func (v PhysicalTaskQueueVersion) Deployment() *deploymentpb.Deployment
- func (v PhysicalTaskQueueVersion) IsVersioned() bool
- func (v PhysicalTaskQueueVersion) MetricsTagValue() string
- func (v PhysicalTaskQueueVersion) VersionSet() string
- func (v PhysicalTaskQueueVersion) WorkerDeploymentVersionS() *deploymentspb.WorkerDeploymentVersion
- type Service
- type TaskDispatchRateLimiter
- type TaskMatcher
- func (tm *TaskMatcher) HasWaitingPoller() bool
- func (tm *TaskMatcher) MustOffer(ctx context.Context, task *internalTask, interruptCh <-chan struct{}) error
- func (tm *TaskMatcher) Offer(ctx context.Context, task *internalTask) (bool, error)
- func (tm *TaskMatcher) OfferNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)
- func (tm *TaskMatcher) OfferQuery(ctx context.Context, task *internalTask) (*matchingservice.QueryWorkflowResponse, error)
- func (tm *TaskMatcher) Poll(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
- func (tm *TaskMatcher) PollForQuery(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
- func (tm *TaskMatcher) ReprocessAllTasks()
- func (tm *TaskMatcher) Start()
- func (tm *TaskMatcher) Stop()
- type TaskQueueRateLimitFractionProvider
- type TaskQueueRateLimitFractionProviderFunc
- type TaskQueueReplicatorNamespaceReplicationQueue
- type UserDataOnChangeFunc
- type UserDataUpdateFunc
- type UserDataUpdateOptions
Constants ¶
This section is empty.
Variables ¶
var (
ErrBlackholedQuery = "" /* 510-byte string literal not displayed */
)
var (
ErrInvalidPersistenceName = errors.New("invalid persistence name")
)
var Module = fx.Options( resource.Module, workerdeployment.Module, fx.Provide(ConfigProvider), fx.Provide(PersistenceRateLimitingParamsProvider), service.PersistenceLazyLoadedServiceResolverModule, fx.Provide(ThrottledLoggerRpsFnProvider), fx.Provide(ServiceErrorInterceptorProvider), fx.Provide(ContextMetadataInterceptorProvider), fx.Provide(RetryableInterceptorProvider), fx.Provide(ErrorHandlerProvider), fx.Provide(TelemetryInterceptorProvider), fx.Provide(NamespaceRateLimitInterceptorProvider), fx.Provide(RateLimitInterceptorProvider), fx.Provide(VisibilityManagerProvider), fx.Provide(WorkersRegistryProvider), fx.Provide(NewHandler), fx.Provide(service.GrpcServerOptionsProvider), fx.Provide(NamespaceReplicationQueueProvider), fx.Provide(ServiceResolverProvider), fx.Provide(ServerProvider), fx.Provide(NewService), fx.Provide(simplePartitionScalerFactoryProvider), fx.Provide(taskQueueRateLimitFractionProviderProvider), fx.Invoke(ServiceLifetimeHooks), )
Functions ¶
func AddCompatibleRedirectRule ¶
func AddCompatibleRedirectRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_AddCompatibleBuildIdRedirectRule, maxRedirectRules, maxUpstreamBuildIds int) (*persistencespb.VersioningData, error)
func CleanupRuleTombstones ¶
func CleanupRuleTombstones(versioningData *persistencespb.VersioningData, retentionTime time.Duration, ) *persistencespb.VersioningData
CleanupRuleTombstones clears all deleted rules from versioning data if the rule was deleted more than retentionTime ago. Clones data to avoid mutating in place.
func ClearTombstones ¶
func ClearTombstones(versioningData *persistencespb.VersioningData) *persistencespb.VersioningData
ClearTombstones clears all tombstone build ids (with STATE_DELETED) from versioning data. Clones data to avoid mutating in place.
func CommitBuildID ¶
func CommitBuildID(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_CommitBuildId, hasRecentPoller bool, maxAssignmentRules int) (*persistencespb.VersioningData, error)
CommitBuildID makes the following changes. If no worker that can accept tasks for the target build ID has been seen recently, the operation will fail. To override this check, set the force flag:
- Adds a fully-ramped assignment rule for the target Build ID at the end of the list. A fully-ramped assignment rule has a ramp percentage of 100 or a ramp of nil.
- Removes all previously added assignment rules to the given target Build ID (if any).
- Removes any *fully-ramped* assignment rule for other Build IDs.
func ContextMetadataInterceptorProvider ¶
func ContextMetadataInterceptorProvider(logger log.Logger) *interceptor.ContextMetadataInterceptor
func DeleteAssignmentRule ¶
func DeleteAssignmentRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_DeleteBuildIdAssignmentRule, ) (*persistencespb.VersioningData, error)
func DeleteCompatibleRedirectRule ¶
func DeleteCompatibleRedirectRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_DeleteCompatibleBuildIdRedirectRule, ) (*persistencespb.VersioningData, error)
func ErrorHandlerProvider ¶
func ErrorHandlerProvider( logger log.Logger, serviceConfig *Config, ) *interceptor.RequestErrorHandler
func FindAssignmentBuildId ¶
func FindAssignmentBuildId(rules []*persistencespb.AssignmentRule, runId string) string
FindAssignmentBuildId finds a build ID for the given runId based on the given rules. Non-empty runId is deterministically mapped to a ramp threshold, while empty runId is mapped randomly each time.
func FindRedirectBuildId ¶
func FindRedirectBuildId(sourceBuildId string, rules []*persistencespb.RedirectRule) string
FindRedirectBuildId follows chain of redirect rules starting from the given sourceBuildId and returns the final target build ID that should be used for redirect. Returns sourceBuildId if no applicable redirect rules exist.
func ForwardPollWithTarget ¶
func ForwardPollWithTarget( ctx context.Context, pollMetadata *pollMetadata, client matchingservice.MatchingServiceClient, source tqid.Partition, target *tqid.NormalPartition, ) (*internalTask, error)
ForwardPollWithTarget forwards a poll request to another partition
func GetBuildIdDeltas ¶
func GetBuildIdDeltas(prev *persistencespb.VersioningData, curr *persistencespb.VersioningData) (added []string, removed []string)
GetBuildIdDeltas compares all active build ids in prev and curr sets and returns sets of added and removed build ids.
func GetTimestampedWorkerVersioningRules ¶
func GetTimestampedWorkerVersioningRules( versioningData *persistencespb.VersioningData, clk *hlc.Clock, ) (*matchingservice.GetWorkerVersioningRulesResponse, error)
func InsertAssignmentRule ¶
func InsertAssignmentRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_InsertBuildIdAssignmentRule, maxAssignmentRules int) (*persistencespb.VersioningData, error)
func IsTaskExpired ¶
func IsTaskExpired(t *persistencespb.AllocatedTaskInfo) bool
TODO https://github.com/temporalio/temporal/issues/1021
there should be more validation logic here 1. if task has valid TTL -> TTL reached -> delete 2. if task has 0 TTL / no TTL -> logic need to additionally check if corresponding workflow still exists
func MergeVersioningData ¶
func MergeVersioningData(a *persistencespb.VersioningData, b *persistencespb.VersioningData) *persistencespb.VersioningData
MergeVersioningData merges two VersioningData structs. If a build ID appears in both data structures, the merged structure will include that latest status and timestamp. If a build ID appears in different sets in the different structures, those sets will be merged. The merged data's per set default and global default will be set according to the latest timestamps in the sources. if (a) is nil, (b) is returned as is, otherwise, if (b) is nil (a) is returned as is.
func NamespaceRateLimitInterceptorProvider ¶
func NamespaceRateLimitInterceptorProvider( serviceConfig *Config, namespaceRegistry namespace.Registry, metricsHandler metrics.Handler, ) interceptor.NamespaceRateLimitInterceptor
func PersistUnknownBuildId ¶
func PersistUnknownBuildId(clock *hlc.Clock, data *persistencespb.VersioningData, buildId string) *persistencespb.VersioningData
func PersistenceRateLimitingParamsProvider ¶
func PersistenceRateLimitingParamsProvider( serviceConfig *Config, persistenceLazyLoadedServiceResolver service.PersistenceLazyLoadedServiceResolver, logger log.SnTaggedLogger, ) service.PersistenceRateLimitingParams
PersistenceRateLimitingParamsProvider is the same between services but uses different config sources. if-case comes from resourceImpl.New.
func RateLimitInterceptorProvider ¶
func RateLimitInterceptorProvider( serviceConfig *Config, ) *interceptor.RateLimitInterceptor
func RemoveBuildIds ¶
func RemoveBuildIds(clock *hlc.Clock, versioningData *persistencespb.VersioningData, buildIds []string) *persistencespb.VersioningData
RemoveBuildIds removes given buildIds from versioning data. Assumes that build ids are safe to remove, ex: a set default is never removed unless it is a single set member and that set is not default for the queue.
func ReplaceAssignmentRule ¶
func ReplaceAssignmentRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_ReplaceBuildIdAssignmentRule, ) (*persistencespb.VersioningData, error)
func ReplaceCompatibleRedirectRule ¶
func ReplaceCompatibleRedirectRule(timestamp *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerVersioningRulesRequest_ReplaceCompatibleBuildIdRedirectRule, maxUpstreamBuildIDs int, ) (*persistencespb.VersioningData, error)
func RetryableInterceptorProvider ¶
func RetryableInterceptorProvider() *interceptor.RetryableInterceptor
func ServerProvider ¶
func ServerProvider(grpcServerOptions []grpc.ServerOption) *grpc.Server
func ServiceErrorInterceptorProvider ¶
func ServiceErrorInterceptorProvider( dc *dynamicconfig.Collection, metricsHandler metrics.Handler, logger log.Logger, ) *interceptor.ServiceErrorInterceptor
func ServiceLifetimeHooks ¶
func ServiceResolverProvider ¶
func ServiceResolverProvider( membershipMonitor membership.Monitor, ) (membership.ServiceResolver, error)
func TelemetryInterceptorProvider ¶
func TelemetryInterceptorProvider( logger log.Logger, namespaceRegistry namespace.Registry, metricsHandler metrics.Handler, serviceConfig *Config, requestErrorHandler *interceptor.RequestErrorHandler, ) *interceptor.TelemetryInterceptor
func ThrottledLoggerRpsFnProvider ¶
func ThrottledLoggerRpsFnProvider(serviceConfig *Config) resource.ThrottledLoggerRpsFn
func ToBuildIdOrderingResponse ¶
func ToBuildIdOrderingResponse(data *persistencespb.VersioningData, maxSets int) *workflowservice.GetWorkerBuildIdCompatibilityResponse
ToBuildIdOrderingResponse transforms the internal VersioningData representation to public representation. If maxSets is given, the last sets up to maxSets will be returned.
func UpdateVersionSets ¶
func UpdateVersionSets(clock *hlc.Clock, data *persistencespb.VersioningData, req *workflowservice.UpdateWorkerBuildIdCompatibilityRequest, maxSets, maxBuildIds int) (*persistencespb.VersioningData, error)
UpdateVersionSets updates version sets given existing versioning data and an update request. The request is expected to have already been validated.
See the API docs for more detail. In short, the versioning data representation consists of a sequence of sequences of compatible versions. Like so:
* ┬─1.0───2.0─┬─3.0───4.0 │ ├─3.1 │ └─3.2 ├─1.1 ├─1.2 └─1.3
In the above example, 4.0 is the current default version and no other versions are compatible with it. The previous compatible set is the 3.x set, with 3.2 being the current default for that set, and so on. The * represents the current default set pointer, which can be shifted around by the user.
A request may:
- Add a new version possibly as the new overall default version, creating a new set.
- Add a new version, compatible with some existing version, adding it to that existing set and making it the new default for that set.
- Target some existing version, marking it (and thus its set) as the default set.
Deletions are performed by a background process which verifies build IDs are no longer in use and safe to delete (not yet implemented).
Update may fail with FailedPrecondition if it would cause exceeding the supplied limits.
func VisibilityManagerProvider ¶
func VisibilityManagerProvider( logger log.Logger, persistenceConfig *config.Persistence, customVisibilityStoreFactory visibility.VisibilityStoreFactory, metricsHandler metrics.Handler, serviceConfig *Config, persistenceServiceResolver resolver.ServiceResolver, searchAttributesMapperProvider searchattribute.MapperProvider, saProvider searchattribute.Provider, namespaceRegistry namespace.Registry, chasmRegistry *chasm.Registry, serializer serialization.Serializer, ) (manager.VisibilityManager, error)
Types ¶
type Config ¶
type Config struct {
PersistenceMaxQPS dynamicconfig.IntPropertyFn
PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn
PersistenceNamespaceMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter
PersistenceGlobalNamespaceMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter
PersistencePerShardNamespaceMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter
PersistenceDynamicRateLimitingParams dynamicconfig.TypedPropertyFn[dynamicconfig.DynamicRateLimitingParams]
PersistenceQPSBurstRatio dynamicconfig.FloatPropertyFn
SyncMatchWaitDuration dynamicconfig.DurationPropertyFnWithTaskQueueFilter
RPS dynamicconfig.IntPropertyFn
NamespaceRPS dynamicconfig.IntPropertyFnWithNamespaceFilter
OperatorRPSRatio dynamicconfig.FloatPropertyFn
PollWaitForNamespaceRateLimitToken dynamicconfig.BoolPropertyFnWithNamespaceFilter
AlignMembershipChange dynamicconfig.DurationPropertyFn
ShutdownDrainDuration dynamicconfig.DurationPropertyFn
HistoryMaxPageSize dynamicconfig.IntPropertyFnWithNamespaceFilter
EnableDeployments dynamicconfig.BoolPropertyFnWithNamespaceFilter // [cleanup-wv-pre-release]
EnableDeploymentVersions dynamicconfig.BoolPropertyFnWithNamespaceFilter
UseRevisionNumberForWorkerVersioning dynamicconfig.BoolPropertyFnWithNamespaceFilter
MaxTaskQueuesInDeployment dynamicconfig.IntPropertyFnWithNamespaceFilter
MaxVersionsInTaskQueue dynamicconfig.IntPropertyFnWithNamespaceFilter
MaxIDLengthLimit dynamicconfig.IntPropertyFn
RangeSize int64
NewMatcherSub dynamicconfig.TypedSubscribableWithTaskQueueFilter[dynamicconfig.GradualChange[bool]]
EnableFairnessSub dynamicconfig.TypedSubscribableWithTaskQueueFilter[dynamicconfig.GradualChange[bool]]
AutoEnableV2Sub dynamicconfig.TypedSubscribableWithTaskQueueFilter[bool]
GetTasksBatchSize dynamicconfig.IntPropertyFnWithTaskQueueFilter
GetTasksReloadAt dynamicconfig.IntPropertyFnWithTaskQueueFilter
UpdateAckInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
MetadataUpdateOnAppendInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
MaxTaskQueueIdleTime dynamicconfig.DurationPropertyFnWithTaskQueueFilter
NumTaskqueueWritePartitions dynamicconfig.IntPropertyFnWithTaskQueueFilter
NumTaskqueueReadPartitions dynamicconfig.IntPropertyFnWithTaskQueueFilter
NumTaskqueueReadPartitionsSub dynamicconfig.TypedSubscribableWithTaskQueueFilter[int]
BreakdownMetricsByTaskQueue dynamicconfig.BoolPropertyFnWithTaskQueueFilter
BreakdownMetricsByPartition dynamicconfig.BoolPropertyFnWithTaskQueueFilter
BreakdownMetricsByBuildID dynamicconfig.BoolPropertyFnWithTaskQueueFilter
EnableWorkerPluginMetrics dynamicconfig.BoolPropertyFn
EnablePollerAutoscalingMetrics dynamicconfig.BoolPropertyFn
ExternalPayloadsEnabled dynamicconfig.BoolPropertyFnWithNamespaceFilter
WorkerRegistryNumBuckets dynamicconfig.IntPropertyFn
WorkerRegistryEntryTTL dynamicconfig.DurationPropertyFn
WorkerRegistryMinEvictAge dynamicconfig.DurationPropertyFn
WorkerRegistryMaxEntries dynamicconfig.IntPropertyFn
WorkerRegistryEvictionInterval dynamicconfig.DurationPropertyFn
ForwarderMaxOutstandingPolls dynamicconfig.IntPropertyFnWithTaskQueueFilter
ForwarderMaxOutstandingTasks dynamicconfig.IntPropertyFnWithTaskQueueFilter
ForwarderMaxRatePerSecond dynamicconfig.FloatPropertyFnWithTaskQueueFilter
ForwarderMaxChildrenPerNode dynamicconfig.IntPropertyFnWithTaskQueueFilter
VersionCompatibleSetLimitPerQueue dynamicconfig.IntPropertyFnWithNamespaceFilter
VersionBuildIdLimitPerQueue dynamicconfig.IntPropertyFnWithNamespaceFilter
AssignmentRuleLimitPerQueue dynamicconfig.IntPropertyFnWithNamespaceFilter
RedirectRuleLimitPerQueue dynamicconfig.IntPropertyFnWithNamespaceFilter
RedirectRuleMaxUpstreamBuildIDsPerQueue dynamicconfig.IntPropertyFnWithNamespaceFilter
DeletedRuleRetentionTime dynamicconfig.DurationPropertyFnWithNamespaceFilter
PollerHistoryTTL dynamicconfig.DurationPropertyFnWithNamespaceFilter
EnableMatchingFanOutForPollCancellation dynamicconfig.BoolPropertyFnWithNamespaceFilter
ReachabilityBuildIdVisibilityGracePeriod dynamicconfig.DurationPropertyFnWithNamespaceFilter
ReachabilityCacheOpenWFsTTL dynamicconfig.DurationPropertyFn
ReachabilityCacheClosedWFsTTL dynamicconfig.DurationPropertyFn
TaskQueueLimitPerBuildId dynamicconfig.IntPropertyFnWithNamespaceFilter
GetUserDataLongPollTimeout dynamicconfig.DurationPropertyFn
GetUserDataRefresh dynamicconfig.DurationPropertyFn
EphemeralDataUpdateInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
BacklogMetricsEmitInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
PriorityBacklogForwarding dynamicconfig.BoolPropertyFnWithTaskQueueFilter
BacklogNegligibleAge dynamicconfig.DurationPropertyFnWithTaskQueueFilter
MaxWaitForPollerBeforeFwd dynamicconfig.DurationPropertyFnWithTaskQueueFilter
WorkerControllerNoPollerHookWindow dynamicconfig.DurationPropertyFn
EmitTaskDispatchLatencyAtPoll dynamicconfig.BoolPropertyFnWithTaskQueueFilter
QueryWorkflowTaskTimeoutLogRate dynamicconfig.FloatPropertyFnWithTaskQueueFilter
MembershipUnloadDelay dynamicconfig.DurationPropertyFn
TaskQueueInfoByBuildIdTTL dynamicconfig.DurationPropertyFnWithTaskQueueFilter
PriorityLevels dynamicconfig.IntPropertyFnWithTaskQueueFilter
RateLimitFractionProvider TaskQueueRateLimitFractionProvider
RateLimiterRefreshInterval time.Duration
FairnessKeyRateLimitCacheSize dynamicconfig.IntPropertyFnWithTaskQueueFilter
MaxFairnessKeyWeightOverrides dynamicconfig.IntPropertyFnWithTaskQueueFilter
// Time to hold a poll request before returning an empty response if there are no tasks
LongPollExpirationInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
BacklogTaskForwardTimeout dynamicconfig.DurationPropertyFnWithTaskQueueFilter
ForwardPollRetryMaxInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
MinTaskThrottlingBurstSize dynamicconfig.IntPropertyFnWithTaskQueueFilter
MaxTaskDeleteBatchSize dynamicconfig.IntPropertyFnWithTaskQueueFilter
TaskDeleteInterval dynamicconfig.DurationPropertyFnWithTaskQueueFilter
// taskWriter configuration
OutstandingTaskAppendsThreshold dynamicconfig.IntPropertyFnWithTaskQueueFilter
MaxTaskBatchSize dynamicconfig.IntPropertyFnWithTaskQueueFilter
ThrottledLogRPS dynamicconfig.IntPropertyFn
AdminNamespaceToPartitionDispatchRate dynamicconfig.FloatPropertyFnWithNamespaceFilter
AdminNamespaceToPartitionRateSub dynamicconfig.TypedSubscribableWithNamespaceFilter[float64]
AdminNamespaceTaskqueueToPartitionDispatchRate dynamicconfig.FloatPropertyFnWithTaskQueueFilter
AdminNamespaceTaskqueueToPartitionRateSub dynamicconfig.TypedSubscribableWithTaskQueueFilter[float64]
VisibilityPersistenceMaxReadQPS dynamicconfig.IntPropertyFn
VisibilityPersistenceMaxWriteQPS dynamicconfig.IntPropertyFn
VisibilityPersistenceSlowQueryThreshold dynamicconfig.DurationPropertyFn
EnableReadFromSecondaryVisibility dynamicconfig.BoolPropertyFnWithNamespaceFilter
VisibilityEnableShadowReadMode dynamicconfig.BoolPropertyFn
VisibilityDisableOrderByClause dynamicconfig.BoolPropertyFnWithNamespaceFilter
VisibilityEnableManualPagination dynamicconfig.BoolPropertyFnWithNamespaceFilter
VisibilityEnableUnifiedQueryConverter dynamicconfig.BoolPropertyFn
ListNexusEndpointsLongPollTimeout dynamicconfig.DurationPropertyFn
NexusEndpointsRefreshInterval dynamicconfig.DurationPropertyFn
MinDispatchTaskTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter
PollerScalingBacklogAgeScaleUp dynamicconfig.DurationPropertyFnWithTaskQueueFilter
PollerScalingWaitTime dynamicconfig.DurationPropertyFnWithTaskQueueFilter
PollerScalingDecisionsPerSecond dynamicconfig.FloatPropertyFnWithTaskQueueFilter
PollerScalingTaskAddToDispatchRatio dynamicconfig.FloatPropertyFnWithTaskQueueFilter
EnablePollerScalingDecisionMetrics dynamicconfig.BoolPropertyFnWithTaskQueueFilter
FairnessCounter dynamicconfig.TypedPropertyFnWithTaskQueueFilter[counter.CounterParams]
FairnessPassDither dynamicconfig.BoolPropertyFnWithTaskQueueFilter
PartitionScaleAllowedDrift dynamicconfig.TypedPropertyFnWithTaskQueueFilter[dynamicconfig.PartitionScaleAllowedDrift]
PartitionScaleManagerSettings dynamicconfig.TypedPropertyFnWithTaskQueueFilter[dynamicconfig.PartitionScaleManagerSettings]
LogAllReqErrors dynamicconfig.BoolPropertyFnWithNamespaceFilter
}
Config represents configuration for matching service
func ConfigProvider ¶
func ConfigProvider( dc *dynamicconfig.Collection, persistenceConfig config.Persistence, rateLimitFractionProvider TaskQueueRateLimitFractionProvider, ) *Config
func NewConfig ¶
func NewConfig( dc *dynamicconfig.Collection, ) *Config
NewConfig returns new service config with default values
type Engine ¶
type Engine interface {
Start()
Stop()
AddWorkflowTask(ctx context.Context, addRequest *matchingservice.AddWorkflowTaskRequest) (buildId string, syncMatch bool, err error)
AddActivityTask(ctx context.Context, addRequest *matchingservice.AddActivityTaskRequest) (buildId string, syncMatch bool, err error)
PollWorkflowTaskQueue(ctx context.Context, request *matchingservice.PollWorkflowTaskQueueRequest, opMetrics metrics.Handler) (*matchingservice.PollWorkflowTaskQueueResponseWithRawHistory, error)
PollActivityTaskQueue(ctx context.Context, request *matchingservice.PollActivityTaskQueueRequest, opMetrics metrics.Handler) (*matchingservice.PollActivityTaskQueueResponse, error)
QueryWorkflow(ctx context.Context, request *matchingservice.QueryWorkflowRequest) (*matchingservice.QueryWorkflowResponse, error)
RespondQueryTaskCompleted(ctx context.Context, request *matchingservice.RespondQueryTaskCompletedRequest, opMetrics metrics.Handler) error
CancelOutstandingPoll(ctx context.Context, request *matchingservice.CancelOutstandingPollRequest) error
CancelOutstandingWorkerPolls(ctx context.Context, request *matchingservice.CancelOutstandingWorkerPollsRequest) (*matchingservice.CancelOutstandingWorkerPollsResponse, error)
CancelOutstandingWorkerPollsPartition(ctx context.Context, request *matchingservice.CancelOutstandingWorkerPollsPartitionRequest) (*matchingservice.CancelOutstandingWorkerPollsPartitionResponse, error)
DescribeTaskQueue(ctx context.Context, request *matchingservice.DescribeTaskQueueRequest) (*matchingservice.DescribeTaskQueueResponse, error)
DescribeTaskQueuePartition(ctx context.Context, request *matchingservice.DescribeTaskQueuePartitionRequest) (*matchingservice.DescribeTaskQueuePartitionResponse, error)
ListTaskQueuePartitions(ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest) (*matchingservice.ListTaskQueuePartitionsResponse, error)
UpdateWorkerBuildIdCompatibility(ctx context.Context, request *matchingservice.UpdateWorkerBuildIdCompatibilityRequest) (*matchingservice.UpdateWorkerBuildIdCompatibilityResponse, error)
GetWorkerBuildIdCompatibility(ctx context.Context, request *matchingservice.GetWorkerBuildIdCompatibilityRequest) (*matchingservice.GetWorkerBuildIdCompatibilityResponse, error)
GetTaskQueueUserData(ctx context.Context, request *matchingservice.GetTaskQueueUserDataRequest) (*matchingservice.GetTaskQueueUserDataResponse, error)
SyncDeploymentUserData(ctx context.Context, request *matchingservice.SyncDeploymentUserDataRequest) (*matchingservice.SyncDeploymentUserDataResponse, error)
ApplyTaskQueueUserDataReplicationEvent(ctx context.Context, request *matchingservice.ApplyTaskQueueUserDataReplicationEventRequest) (*matchingservice.ApplyTaskQueueUserDataReplicationEventResponse, error)
GetBuildIdTaskQueueMapping(ctx context.Context, request *matchingservice.GetBuildIdTaskQueueMappingRequest) (*matchingservice.GetBuildIdTaskQueueMappingResponse, error)
ForceUnloadTaskQueuePartition(ctx context.Context, request *matchingservice.ForceUnloadTaskQueuePartitionRequest) (*matchingservice.ForceUnloadTaskQueuePartitionResponse, error)
ForceUnloadTaskQueue(ctx context.Context, request *matchingservice.ForceUnloadTaskQueueRequest) (*matchingservice.ForceUnloadTaskQueueResponse, error)
ForceLoadTaskQueuePartition(ctx context.Context, request *matchingservice.ForceLoadTaskQueuePartitionRequest) (*matchingservice.ForceLoadTaskQueuePartitionResponse, error)
UpdateTaskQueueUserData(ctx context.Context, request *matchingservice.UpdateTaskQueueUserDataRequest) (*matchingservice.UpdateTaskQueueUserDataResponse, error)
ReplicateTaskQueueUserData(ctx context.Context, request *matchingservice.ReplicateTaskQueueUserDataRequest) (*matchingservice.ReplicateTaskQueueUserDataResponse, error)
CheckTaskQueueUserDataPropagation(ctx context.Context, request *matchingservice.CheckTaskQueueUserDataPropagationRequest) (*matchingservice.CheckTaskQueueUserDataPropagationResponse, error)
CheckTaskQueueVersionMembership(ctx context.Context, request *matchingservice.CheckTaskQueueVersionMembershipRequest) (*matchingservice.CheckTaskQueueVersionMembershipResponse, error)
DispatchNexusTask(ctx context.Context, request *matchingservice.DispatchNexusTaskRequest) (*matchingservice.DispatchNexusTaskResponse, error)
PollNexusTaskQueue(ctx context.Context, request *matchingservice.PollNexusTaskQueueRequest, opMetrics metrics.Handler) (*matchingservice.PollNexusTaskQueueResponse, error)
RespondNexusTaskCompleted(ctx context.Context, request *matchingservice.RespondNexusTaskCompletedRequest, opMetrics metrics.Handler) (*matchingservice.RespondNexusTaskCompletedResponse, error)
RespondNexusTaskFailed(ctx context.Context, request *matchingservice.RespondNexusTaskFailedRequest, opMetrics metrics.Handler) (*matchingservice.RespondNexusTaskFailedResponse, error)
CreateNexusEndpoint(ctx context.Context, request *matchingservice.CreateNexusEndpointRequest) (*matchingservice.CreateNexusEndpointResponse, error)
UpdateNexusEndpoint(ctx context.Context, request *matchingservice.UpdateNexusEndpointRequest) (*matchingservice.UpdateNexusEndpointResponse, error)
DeleteNexusEndpoint(ctx context.Context, request *matchingservice.DeleteNexusEndpointRequest) (*matchingservice.DeleteNexusEndpointResponse, error)
ListNexusEndpoints(ctx context.Context, request *matchingservice.ListNexusEndpointsRequest) (*matchingservice.ListNexusEndpointsResponse, error)
UpdateWorkerVersioningRules(ctx context.Context, request *matchingservice.UpdateWorkerVersioningRulesRequest) (*matchingservice.UpdateWorkerVersioningRulesResponse, error)
GetWorkerVersioningRules(ctx context.Context, request *matchingservice.GetWorkerVersioningRulesRequest) (*matchingservice.GetWorkerVersioningRulesResponse, error)
DescribeVersionedTaskQueues(ctx context.Context, request *matchingservice.DescribeVersionedTaskQueuesRequest) (*matchingservice.DescribeVersionedTaskQueuesResponse, error)
UpdateTaskQueueConfig(ctx context.Context, request *matchingservice.UpdateTaskQueueConfigRequest) (*matchingservice.UpdateTaskQueueConfigResponse, error)
UpdateFairnessState(ctx context.Context, request *matchingservice.UpdateFairnessStateRequest) (*matchingservice.UpdateFairnessStateResponse, error)
}
Engine exposes interfaces for clients to interact with the matching engine
func NewEngine ¶
func NewEngine( taskManager persistence.TaskManager, fairTaskManager persistence.FairTaskManager, historyClient resource.HistoryClient, matchingRawClient resource.MatchingRawClient, workerDeploymentClient workerdeployment.Client, config *Config, logger log.Logger, throttledLogger log.ThrottledLogger, metricsHandler metrics.Handler, namespaceRegistry namespace.Registry, hostInfoProvider membership.HostInfoProvider, resolver membership.ServiceResolver, clusterMeta cluster.Metadata, namespaceReplicationQueue persistence.NamespaceReplicationQueue, visibilityManager manager.VisibilityManager, nexusEndpointManager persistence.NexusEndpointManager, testHooks testhooks.TestHooks, saProvider searchattribute.Provider, saMapperProvider searchattribute.MapperProvider, rateLimiter TaskDispatchRateLimiter, historySerializer serialization.Serializer, taskHookFactories []hooks.TaskHookFactory, partitionScalerFactory PartitionScalerFactory, ) Engine
NewEngine creates an instance of matching engine
type EphemeralDataChangeFunc ¶
type EphemeralDataChangeFunc func(*taskqueuespb.EphemeralData)
type Forwarder ¶
type Forwarder struct {
// contains filtered or unexported fields
}
Forwarder is the type that contains state pertaining to the api call forwarder component
func (*Forwarder) AddReqTokenC ¶
func (fwdr *Forwarder) AddReqTokenC() <-chan *ForwarderReqToken
AddReqTokenC returns a channel that can be used to wait for a token that's necessary before making a ForwardTask or ForwardQueryTask API call. After the API call is invoked, token.release() must be invoked
func (*Forwarder) ForwardNexusTask ¶
func (fwdr *Forwarder) ForwardNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)
ForwardNexusTask forwards a nexus task to parent task queue partition, if it exists.
func (*Forwarder) ForwardPoll ¶
func (fwdr *Forwarder) ForwardPoll(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
ForwardPoll forwards a poll request to parent task queue partition if it exist
func (*Forwarder) ForwardQueryTask ¶
func (fwdr *Forwarder) ForwardQueryTask( ctx context.Context, task *internalTask, ) (*matchingservice.QueryWorkflowResponse, error)
ForwardQueryTask forwards a query task to parent task queue partition, if it exists
func (*Forwarder) ForwardTask ¶
ForwardTask forwards an activity or workflow task to the parent task queue partition if it exists
func (*Forwarder) PollReqTokenC ¶
func (fwdr *Forwarder) PollReqTokenC() <-chan *ForwarderReqToken
PollReqTokenC returns a channel that can be used to wait for a token that's necessary before making a ForwardPoll API call. After the API call is invoked, token.release() must be invoked
type ForwarderReqToken ¶
type ForwarderReqToken struct {
// contains filtered or unexported fields
}
ForwarderReqToken is the token that must be acquired before making forwarder API calls. This type contains the state for the token itself
type Handler ¶
type Handler struct {
matchingservice.UnimplementedMatchingServiceServer
// contains filtered or unexported fields
}
Handler - gRPC handler interface for matchingservice
func NewHandler ¶
func NewHandler( params HandlerParams, ) *Handler
NewHandler creates a gRPC handler for the matchingservice
func (*Handler) AddActivityTask ¶
func (h *Handler) AddActivityTask( ctx context.Context, request *matchingservice.AddActivityTaskRequest, ) (_ *matchingservice.AddActivityTaskResponse, retError error)
AddActivityTask - adds an activity task.
func (*Handler) AddWorkflowTask ¶
func (h *Handler) AddWorkflowTask( ctx context.Context, request *matchingservice.AddWorkflowTaskRequest, ) (_ *matchingservice.AddWorkflowTaskResponse, retError error)
AddWorkflowTask - adds a workflow task.
func (*Handler) ApplyTaskQueueUserDataReplicationEvent ¶
func (h *Handler) ApplyTaskQueueUserDataReplicationEvent( ctx context.Context, request *matchingservice.ApplyTaskQueueUserDataReplicationEventRequest, ) (_ *matchingservice.ApplyTaskQueueUserDataReplicationEventResponse, retError error)
func (*Handler) CancelOutstandingPoll ¶
func (h *Handler) CancelOutstandingPoll(ctx context.Context, request *matchingservice.CancelOutstandingPollRequest) (_ *matchingservice.CancelOutstandingPollResponse, retError error)
CancelOutstandingPoll is used to cancel outstanding pollers
func (*Handler) CancelOutstandingWorkerPolls ¶
func (h *Handler) CancelOutstandingWorkerPolls(ctx context.Context, request *matchingservice.CancelOutstandingWorkerPollsRequest) (_ *matchingservice.CancelOutstandingWorkerPollsResponse, retError error)
CancelOutstandingWorkerPolls cancels all outstanding polls for a given worker instance key.
func (*Handler) CancelOutstandingWorkerPollsPartition ¶
func (h *Handler) CancelOutstandingWorkerPollsPartition(ctx context.Context, request *matchingservice.CancelOutstandingWorkerPollsPartitionRequest) (_ *matchingservice.CancelOutstandingWorkerPollsPartitionResponse, retError error)
CancelOutstandingWorkerPollsPartition cancels outstanding polls for a worker on a specific partition.
func (*Handler) CheckTaskQueueUserDataPropagation ¶
func (h *Handler) CheckTaskQueueUserDataPropagation( ctx context.Context, request *matchingservice.CheckTaskQueueUserDataPropagationRequest, ) (_ *matchingservice.CheckTaskQueueUserDataPropagationResponse, retError error)
func (*Handler) CheckTaskQueueVersionMembership ¶
func (h *Handler) CheckTaskQueueVersionMembership( ctx context.Context, request *matchingservice.CheckTaskQueueVersionMembershipRequest, ) (_ *matchingservice.CheckTaskQueueVersionMembershipResponse, retError error)
func (*Handler) CountWorkers ¶
func (h *Handler) CountWorkers( _ context.Context, request *matchingservice.CountWorkersRequest, ) (_ *matchingservice.CountWorkersResponse, retError error)
func (*Handler) CreateNexusEndpoint ¶
func (h *Handler) CreateNexusEndpoint(ctx context.Context, request *matchingservice.CreateNexusEndpointRequest) (_ *matchingservice.CreateNexusEndpointResponse, retError error)
func (*Handler) DeleteNexusEndpoint ¶
func (h *Handler) DeleteNexusEndpoint(ctx context.Context, request *matchingservice.DeleteNexusEndpointRequest) (_ *matchingservice.DeleteNexusEndpointResponse, retError error)
func (*Handler) DescribeTaskQueue ¶
func (h *Handler) DescribeTaskQueue( ctx context.Context, request *matchingservice.DescribeTaskQueueRequest, ) (_ *matchingservice.DescribeTaskQueueResponse, retError error)
DescribeTaskQueue returns information about the target task queue, right now this API returns the pollers which polled this task queue in last few minutes. If includeTaskQueueStatus field is true, it will also return status of task queue's ackManager (readLevel, ackLevel, backlogCountHint and taskIDBlock).
func (*Handler) DescribeTaskQueuePartition ¶
func (h *Handler) DescribeTaskQueuePartition( ctx context.Context, request *matchingservice.DescribeTaskQueuePartitionRequest, ) (_ *matchingservice.DescribeTaskQueuePartitionResponse, retError error)
DescribeTaskQueuePartition returns information about the target task queue partition.
func (*Handler) DescribeVersionedTaskQueues ¶
func (h *Handler) DescribeVersionedTaskQueues( ctx context.Context, request *matchingservice.DescribeVersionedTaskQueuesRequest, ) (_ *matchingservice.DescribeVersionedTaskQueuesResponse, retError error)
func (*Handler) DescribeWorker ¶
func (h *Handler) DescribeWorker( _ context.Context, request *matchingservice.DescribeWorkerRequest, ) (_ *matchingservice.DescribeWorkerResponse, retError error)
func (*Handler) DispatchNexusTask ¶
func (h *Handler) DispatchNexusTask(ctx context.Context, request *matchingservice.DispatchNexusTaskRequest) (_ *matchingservice.DispatchNexusTaskResponse, retError error)
func (*Handler) ForceLoadTaskQueuePartition ¶
func (h *Handler) ForceLoadTaskQueuePartition( ctx context.Context, request *matchingservice.ForceLoadTaskQueuePartitionRequest, ) (_ *matchingservice.ForceLoadTaskQueuePartitionResponse, retError error)
func (*Handler) ForceUnloadTaskQueue ¶
func (h *Handler) ForceUnloadTaskQueue( ctx context.Context, request *matchingservice.ForceUnloadTaskQueueRequest, ) (_ *matchingservice.ForceUnloadTaskQueueResponse, retError error)
func (*Handler) ForceUnloadTaskQueuePartition ¶
func (h *Handler) ForceUnloadTaskQueuePartition( ctx context.Context, request *matchingservice.ForceUnloadTaskQueuePartitionRequest, ) (_ *matchingservice.ForceUnloadTaskQueuePartitionResponse, retError error)
func (*Handler) GetBuildIdTaskQueueMapping ¶
func (h *Handler) GetBuildIdTaskQueueMapping( ctx context.Context, request *matchingservice.GetBuildIdTaskQueueMappingRequest, ) (_ *matchingservice.GetBuildIdTaskQueueMappingResponse, retError error)
func (*Handler) GetTaskQueueUserData ¶
func (h *Handler) GetTaskQueueUserData( ctx context.Context, request *matchingservice.GetTaskQueueUserDataRequest, ) (_ *matchingservice.GetTaskQueueUserDataResponse, retError error)
func (*Handler) GetWorkerBuildIdCompatibility ¶
func (h *Handler) GetWorkerBuildIdCompatibility( ctx context.Context, request *matchingservice.GetWorkerBuildIdCompatibilityRequest, ) (_ *matchingservice.GetWorkerBuildIdCompatibilityResponse, retError error)
GetWorkerBuildIdCompatibility fetches the worker versioning data for a task queue
func (*Handler) GetWorkerVersioningRules ¶
func (h *Handler) GetWorkerVersioningRules( ctx context.Context, request *matchingservice.GetWorkerVersioningRulesRequest, ) (_ *matchingservice.GetWorkerVersioningRulesResponse, retError error)
GetWorkerVersioningRules fetches the Build ID assignment and redirect rules for a Task Queue
func (*Handler) ListNexusEndpoints ¶
func (h *Handler) ListNexusEndpoints(ctx context.Context, request *matchingservice.ListNexusEndpointsRequest) (_ *matchingservice.ListNexusEndpointsResponse, retError error)
func (*Handler) ListTaskQueuePartitions ¶
func (h *Handler) ListTaskQueuePartitions( ctx context.Context, request *matchingservice.ListTaskQueuePartitionsRequest, ) (_ *matchingservice.ListTaskQueuePartitionsResponse, retError error)
ListTaskQueuePartitions returns information about partitions for a taskQueue
func (*Handler) ListWorkers ¶
func (h *Handler) ListWorkers( _ context.Context, request *matchingservice.ListWorkersRequest, ) (_ *matchingservice.ListWorkersResponse, retError error)
ListWorkers retrieves a list of workers in the specified namespace that match the provided filters.
func (*Handler) PollActivityTaskQueue ¶
func (h *Handler) PollActivityTaskQueue( ctx context.Context, request *matchingservice.PollActivityTaskQueueRequest, ) (_ *matchingservice.PollActivityTaskQueueResponse, retError error)
PollActivityTaskQueue - long poll for an activity task.
func (*Handler) PollNexusTaskQueue ¶
func (h *Handler) PollNexusTaskQueue(ctx context.Context, request *matchingservice.PollNexusTaskQueueRequest) (_ *matchingservice.PollNexusTaskQueueResponse, retError error)
func (*Handler) PollWorkflowTaskQueue ¶
func (h *Handler) PollWorkflowTaskQueue( ctx context.Context, request *matchingservice.PollWorkflowTaskQueueRequest, ) (_ *matchingservice.PollWorkflowTaskQueueResponseWithRawHistory, retError error)
PollWorkflowTaskQueue - long poll for a workflow task.
func (*Handler) QueryWorkflow ¶
func (h *Handler) QueryWorkflow( ctx context.Context, request *matchingservice.QueryWorkflowRequest, ) (_ *matchingservice.QueryWorkflowResponse, retError error)
QueryWorkflow queries a given workflow synchronously and return the query result.
func (*Handler) RecordWorkerHeartbeat ¶
func (h *Handler) RecordWorkerHeartbeat( ctx context.Context, request *matchingservice.RecordWorkerHeartbeatRequest, ) (_ *matchingservice.RecordWorkerHeartbeatResponse, retError error)
RecordWorkerHeartbeat receive heartbeat request from the worker.
func (*Handler) ReplicateTaskQueueUserData ¶
func (h *Handler) ReplicateTaskQueueUserData( ctx context.Context, request *matchingservice.ReplicateTaskQueueUserDataRequest, ) (_ *matchingservice.ReplicateTaskQueueUserDataResponse, retError error)
func (*Handler) RespondNexusTaskCompleted ¶
func (h *Handler) RespondNexusTaskCompleted(ctx context.Context, request *matchingservice.RespondNexusTaskCompletedRequest) (_ *matchingservice.RespondNexusTaskCompletedResponse, retError error)
func (*Handler) RespondNexusTaskFailed ¶
func (h *Handler) RespondNexusTaskFailed(ctx context.Context, request *matchingservice.RespondNexusTaskFailedRequest) (_ *matchingservice.RespondNexusTaskFailedResponse, retError error)
func (*Handler) RespondQueryTaskCompleted ¶
func (h *Handler) RespondQueryTaskCompleted( ctx context.Context, request *matchingservice.RespondQueryTaskCompletedRequest, ) (_ *matchingservice.RespondQueryTaskCompletedResponse, retError error)
RespondQueryTaskCompleted responds a query task completed
func (*Handler) SyncDeploymentUserData ¶
func (h *Handler) SyncDeploymentUserData( ctx context.Context, request *matchingservice.SyncDeploymentUserDataRequest, ) (_ *matchingservice.SyncDeploymentUserDataResponse, retError error)
func (*Handler) UpdateFairnessState ¶
func (h *Handler) UpdateFairnessState( ctx context.Context, request *matchingservice.UpdateFairnessStateRequest, ) (_ *matchingservice.UpdateFairnessStateResponse, retError error)
func (*Handler) UpdateNexusEndpoint ¶
func (h *Handler) UpdateNexusEndpoint(ctx context.Context, request *matchingservice.UpdateNexusEndpointRequest) (_ *matchingservice.UpdateNexusEndpointResponse, retError error)
func (*Handler) UpdateTaskQueueConfig ¶
func (h *Handler) UpdateTaskQueueConfig( ctx context.Context, request *matchingservice.UpdateTaskQueueConfigRequest, ) (_ *matchingservice.UpdateTaskQueueConfigResponse, retError error)
func (*Handler) UpdateTaskQueueUserData ¶
func (h *Handler) UpdateTaskQueueUserData( ctx context.Context, request *matchingservice.UpdateTaskQueueUserDataRequest, ) (_ *matchingservice.UpdateTaskQueueUserDataResponse, retError error)
func (*Handler) UpdateWorkerBuildIdCompatibility ¶
func (h *Handler) UpdateWorkerBuildIdCompatibility( ctx context.Context, request *matchingservice.UpdateWorkerBuildIdCompatibilityRequest, ) (_ *matchingservice.UpdateWorkerBuildIdCompatibilityResponse, retError error)
UpdateWorkerBuildIdCompatibility allows changing the worker versioning graph for a task queue
func (*Handler) UpdateWorkerVersioningRules ¶
func (h *Handler) UpdateWorkerVersioningRules( ctx context.Context, request *matchingservice.UpdateWorkerVersioningRulesRequest, ) (_ *matchingservice.UpdateWorkerVersioningRulesResponse, retError error)
UpdateWorkerVersioningRules allows updating the Build ID assignment and redirect rules for a given Task Queue.
type HandlerParams ¶
type HandlerParams struct {
fx.In
Config *Config
Logger log.Logger
ThrottledLogger log.Logger
TaskManager persistence.TaskManager
FairTaskManager persistence.FairTaskManager
HistoryClient resource.HistoryClient
MatchingRawClient resource.MatchingRawClient
WorkerDeploymentClient workerdeployment.Client
HostInfoProvider membership.HostInfoProvider
MatchingServiceResolver membership.ServiceResolver
MetricsHandler metrics.Handler
NamespaceRegistry namespace.Registry
ClusterMetadata cluster.Metadata
NamespaceReplicationQueue persistence.NamespaceReplicationQueue
VisibilityManager manager.VisibilityManager
NexusEndpointManager persistence.NexusEndpointManager
TestHooks testhooks.TestHooks
SearchAttributeProvider searchattribute.Provider
SearchAttributeMapperProvider searchattribute.MapperProvider
RateLimiter TaskDispatchRateLimiter `optional:"true"`
WorkersRegistry workers.Registry
Serializer serialization.Serializer
TaskHookFactories []hooks.TaskHookFactory `group:"TaskHookFactories"`
PartitionScalerFactory PartitionScalerFactory
}
type MockPartitionScaler ¶
type MockPartitionScaler struct {
// contains filtered or unexported fields
}
MockPartitionScaler is a mock of PartitionScaler interface.
func NewMockPartitionScaler ¶
func NewMockPartitionScaler(ctrl *gomock.Controller) *MockPartitionScaler
NewMockPartitionScaler creates a new mock instance.
func (*MockPartitionScaler) EXPECT ¶
func (m *MockPartitionScaler) EXPECT() *MockPartitionScalerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPartitionScaler) OnTasks ¶
func (m *MockPartitionScaler) OnTasks(arg0 PartitionScalerInput) PartitionScalerDecision
OnTasks mocks base method.
type MockPartitionScalerFactory ¶
type MockPartitionScalerFactory struct {
// contains filtered or unexported fields
}
MockPartitionScalerFactory is a mock of PartitionScalerFactory interface.
func NewMockPartitionScalerFactory ¶
func NewMockPartitionScalerFactory(ctrl *gomock.Controller) *MockPartitionScalerFactory
NewMockPartitionScalerFactory creates a new mock instance.
func (*MockPartitionScalerFactory) EXPECT ¶
func (m *MockPartitionScalerFactory) EXPECT() *MockPartitionScalerFactoryMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockPartitionScalerFactory) New ¶
func (m *MockPartitionScalerFactory) New(nsName namespace.Name, tqName string, tqType enums.TaskQueueType) PartitionScaler
New mocks base method.
type MockPartitionScalerFactoryMockRecorder ¶
type MockPartitionScalerFactoryMockRecorder struct {
// contains filtered or unexported fields
}
MockPartitionScalerFactoryMockRecorder is the mock recorder for MockPartitionScalerFactory.
type MockPartitionScalerMockRecorder ¶
type MockPartitionScalerMockRecorder struct {
// contains filtered or unexported fields
}
MockPartitionScalerMockRecorder is the mock recorder for MockPartitionScaler.
func (*MockPartitionScalerMockRecorder) OnTasks ¶
func (mr *MockPartitionScalerMockRecorder) OnTasks(arg0 any) *gomock.Call
OnTasks indicates an expected call of OnTasks.
func (*MockPartitionScalerMockRecorder) Stop ¶
func (mr *MockPartitionScalerMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
type MockphysicalTaskQueueManager ¶
type MockphysicalTaskQueueManager struct {
// contains filtered or unexported fields
}
MockphysicalTaskQueueManager is a mock of physicalTaskQueueManager interface.
func NewMockphysicalTaskQueueManager ¶
func NewMockphysicalTaskQueueManager(ctrl *gomock.Controller) *MockphysicalTaskQueueManager
NewMockphysicalTaskQueueManager creates a new mock instance.
func (*MockphysicalTaskQueueManager) AddSpooledTask ¶
func (m *MockphysicalTaskQueueManager) AddSpooledTask(task *internalTask) error
AddSpooledTask mocks base method.
func (*MockphysicalTaskQueueManager) AddSpooledTaskToMatcher ¶
func (m *MockphysicalTaskQueueManager) AddSpooledTaskToMatcher(task *internalTask) error
AddSpooledTaskToMatcher mocks base method.
func (*MockphysicalTaskQueueManager) DispatchNexusTask ¶
func (m *MockphysicalTaskQueueManager) DispatchNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)
DispatchNexusTask mocks base method.
func (*MockphysicalTaskQueueManager) DispatchQueryTask ¶
func (m *MockphysicalTaskQueueManager) DispatchQueryTask(ctx context.Context, task *internalTask) (*matchingservice.QueryWorkflowResponse, error)
DispatchQueryTask mocks base method.
func (*MockphysicalTaskQueueManager) DispatchSpooledTask ¶
func (m *MockphysicalTaskQueueManager) DispatchSpooledTask(ctx context.Context, task *internalTask, userDataChanged <-chan struct{}) error
DispatchSpooledTask mocks base method.
func (*MockphysicalTaskQueueManager) EXPECT ¶
func (m *MockphysicalTaskQueueManager) EXPECT() *MockphysicalTaskQueueManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockphysicalTaskQueueManager) FinishedDraining ¶
func (m *MockphysicalTaskQueueManager) FinishedDraining()
FinishedDraining mocks base method.
func (*MockphysicalTaskQueueManager) GetAllPollerInfo ¶
func (m *MockphysicalTaskQueueManager) GetAllPollerInfo() []*taskqueue.PollerInfo
GetAllPollerInfo mocks base method.
func (*MockphysicalTaskQueueManager) GetFairnessWeightOverrides ¶
func (m *MockphysicalTaskQueueManager) GetFairnessWeightOverrides() fairnessWeightOverrides
GetFairnessWeightOverrides mocks base method.
func (*MockphysicalTaskQueueManager) GetInternalTaskQueueStatus ¶
func (m *MockphysicalTaskQueueManager) GetInternalTaskQueueStatus() []*taskqueue0.InternalTaskQueueStatus
GetInternalTaskQueueStatus mocks base method.
func (*MockphysicalTaskQueueManager) GetStatsByPriority ¶
func (m *MockphysicalTaskQueueManager) GetStatsByPriority(includeRates bool) map[int32]*taskqueue.TaskQueueStats
GetStatsByPriority mocks base method.
func (*MockphysicalTaskQueueManager) HasPollerAfter ¶
func (m *MockphysicalTaskQueueManager) HasPollerAfter(accessTime time.Time) bool
HasPollerAfter mocks base method.
func (*MockphysicalTaskQueueManager) LegacyDescribeTaskQueue ¶
func (m *MockphysicalTaskQueueManager) LegacyDescribeTaskQueue(includeTaskQueueStatus bool) *matchingservice.DescribeTaskQueueResponse
LegacyDescribeTaskQueue mocks base method.
func (*MockphysicalTaskQueueManager) MakePollerScalingDecision ¶
func (m *MockphysicalTaskQueueManager) MakePollerScalingDecision(ctx context.Context, pollStartTime time.Time) *taskqueue.PollerScalingDecision
MakePollerScalingDecision mocks base method.
func (*MockphysicalTaskQueueManager) MarkAlive ¶
func (m *MockphysicalTaskQueueManager) MarkAlive()
MarkAlive mocks base method.
func (*MockphysicalTaskQueueManager) PollTask ¶
func (m *MockphysicalTaskQueueManager) PollTask(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
PollTask mocks base method.
func (*MockphysicalTaskQueueManager) ProcessSpooledTask ¶
func (m *MockphysicalTaskQueueManager) ProcessSpooledTask(ctx context.Context, task *internalTask) error
ProcessSpooledTask mocks base method.
func (*MockphysicalTaskQueueManager) QueueKey ¶
func (m *MockphysicalTaskQueueManager) QueueKey() *PhysicalTaskQueueKey
QueueKey mocks base method.
func (*MockphysicalTaskQueueManager) RecordTaskAdd ¶
func (m *MockphysicalTaskQueueManager) RecordTaskAdd(result string, forwarded bool, behavior enums.VersioningBehavior)
RecordTaskAdd mocks base method.
func (*MockphysicalTaskQueueManager) RemovePoller ¶
func (m *MockphysicalTaskQueueManager) RemovePoller(arg0 pollerIdentity)
RemovePoller mocks base method.
func (*MockphysicalTaskQueueManager) ReprocessRedirectedTasksAfterStop ¶
func (m *MockphysicalTaskQueueManager) ReprocessRedirectedTasksAfterStop()
ReprocessRedirectedTasksAfterStop mocks base method.
func (*MockphysicalTaskQueueManager) SetupDraining ¶
func (m *MockphysicalTaskQueueManager) SetupDraining()
SetupDraining mocks base method.
func (*MockphysicalTaskQueueManager) SpoolTask ¶
func (m *MockphysicalTaskQueueManager) SpoolTask(taskInfo *persistence.TaskInfo) error
SpoolTask mocks base method.
func (*MockphysicalTaskQueueManager) Start ¶
func (m *MockphysicalTaskQueueManager) Start()
Start mocks base method.
func (*MockphysicalTaskQueueManager) StartScaleManager ¶
func (m *MockphysicalTaskQueueManager) StartScaleManager(arg0 *persistence.PartitionScaleState)
StartScaleManager mocks base method.
func (*MockphysicalTaskQueueManager) Stop ¶
func (m *MockphysicalTaskQueueManager) Stop(arg0 unloadCause)
Stop mocks base method.
func (*MockphysicalTaskQueueManager) TrySyncMatch ¶
func (m *MockphysicalTaskQueueManager) TrySyncMatch(ctx context.Context, task *internalTask) (syncMatchOutcome, error)
TrySyncMatch mocks base method.
func (*MockphysicalTaskQueueManager) UnloadFromPartitionManager ¶
func (m *MockphysicalTaskQueueManager) UnloadFromPartitionManager(arg0 unloadCause)
UnloadFromPartitionManager mocks base method.
func (*MockphysicalTaskQueueManager) UpdatePollerInfo ¶
func (m *MockphysicalTaskQueueManager) UpdatePollerInfo(arg0 pollerIdentity, arg1 *pollMetadata)
UpdatePollerInfo mocks base method.
func (*MockphysicalTaskQueueManager) UpdateRemotePriorityBacklogs ¶
func (m *MockphysicalTaskQueueManager) UpdateRemotePriorityBacklogs(arg0 remotePriorityBacklogSet)
UpdateRemotePriorityBacklogs mocks base method.
func (*MockphysicalTaskQueueManager) UpdateScaleState ¶
func (m *MockphysicalTaskQueueManager) UpdateScaleState(arg0 *persistence.PartitionScaleState, arg1 bool) error
UpdateScaleState mocks base method.
func (*MockphysicalTaskQueueManager) UserDataChanged ¶
func (m *MockphysicalTaskQueueManager) UserDataChanged()
UserDataChanged mocks base method.
func (*MockphysicalTaskQueueManager) WaitUntilInitialized ¶
func (m *MockphysicalTaskQueueManager) WaitUntilInitialized(arg0 context.Context) error
WaitUntilInitialized mocks base method.
type MockphysicalTaskQueueManagerMockRecorder ¶
type MockphysicalTaskQueueManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockphysicalTaskQueueManagerMockRecorder is the mock recorder for MockphysicalTaskQueueManager.
func (*MockphysicalTaskQueueManagerMockRecorder) AddSpooledTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) AddSpooledTask(task any) *gomock.Call
AddSpooledTask indicates an expected call of AddSpooledTask.
func (*MockphysicalTaskQueueManagerMockRecorder) AddSpooledTaskToMatcher ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) AddSpooledTaskToMatcher(task any) *gomock.Call
AddSpooledTaskToMatcher indicates an expected call of AddSpooledTaskToMatcher.
func (*MockphysicalTaskQueueManagerMockRecorder) DispatchNexusTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchNexusTask(ctx, task any) *gomock.Call
DispatchNexusTask indicates an expected call of DispatchNexusTask.
func (*MockphysicalTaskQueueManagerMockRecorder) DispatchQueryTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchQueryTask(ctx, task any) *gomock.Call
DispatchQueryTask indicates an expected call of DispatchQueryTask.
func (*MockphysicalTaskQueueManagerMockRecorder) DispatchSpooledTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchSpooledTask(ctx, task, userDataChanged any) *gomock.Call
DispatchSpooledTask indicates an expected call of DispatchSpooledTask.
func (*MockphysicalTaskQueueManagerMockRecorder) FinishedDraining ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) FinishedDraining() *gomock.Call
FinishedDraining indicates an expected call of FinishedDraining.
func (*MockphysicalTaskQueueManagerMockRecorder) GetAllPollerInfo ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) GetAllPollerInfo() *gomock.Call
GetAllPollerInfo indicates an expected call of GetAllPollerInfo.
func (*MockphysicalTaskQueueManagerMockRecorder) GetFairnessWeightOverrides ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) GetFairnessWeightOverrides() *gomock.Call
GetFairnessWeightOverrides indicates an expected call of GetFairnessWeightOverrides.
func (*MockphysicalTaskQueueManagerMockRecorder) GetInternalTaskQueueStatus ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) GetInternalTaskQueueStatus() *gomock.Call
GetInternalTaskQueueStatus indicates an expected call of GetInternalTaskQueueStatus.
func (*MockphysicalTaskQueueManagerMockRecorder) GetStatsByPriority ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) GetStatsByPriority(includeRates any) *gomock.Call
GetStatsByPriority indicates an expected call of GetStatsByPriority.
func (*MockphysicalTaskQueueManagerMockRecorder) HasPollerAfter ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) HasPollerAfter(accessTime any) *gomock.Call
HasPollerAfter indicates an expected call of HasPollerAfter.
func (*MockphysicalTaskQueueManagerMockRecorder) LegacyDescribeTaskQueue ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) LegacyDescribeTaskQueue(includeTaskQueueStatus any) *gomock.Call
LegacyDescribeTaskQueue indicates an expected call of LegacyDescribeTaskQueue.
func (*MockphysicalTaskQueueManagerMockRecorder) MakePollerScalingDecision ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) MakePollerScalingDecision(ctx, pollStartTime any) *gomock.Call
MakePollerScalingDecision indicates an expected call of MakePollerScalingDecision.
func (*MockphysicalTaskQueueManagerMockRecorder) MarkAlive ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) MarkAlive() *gomock.Call
MarkAlive indicates an expected call of MarkAlive.
func (*MockphysicalTaskQueueManagerMockRecorder) PollTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) PollTask(ctx, pollMetadata any) *gomock.Call
PollTask indicates an expected call of PollTask.
func (*MockphysicalTaskQueueManagerMockRecorder) ProcessSpooledTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) ProcessSpooledTask(ctx, task any) *gomock.Call
ProcessSpooledTask indicates an expected call of ProcessSpooledTask.
func (*MockphysicalTaskQueueManagerMockRecorder) QueueKey ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) QueueKey() *gomock.Call
QueueKey indicates an expected call of QueueKey.
func (*MockphysicalTaskQueueManagerMockRecorder) RecordTaskAdd ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) RecordTaskAdd(result, forwarded, behavior any) *gomock.Call
RecordTaskAdd indicates an expected call of RecordTaskAdd.
func (*MockphysicalTaskQueueManagerMockRecorder) RemovePoller ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) RemovePoller(arg0 any) *gomock.Call
RemovePoller indicates an expected call of RemovePoller.
func (*MockphysicalTaskQueueManagerMockRecorder) ReprocessRedirectedTasksAfterStop ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) ReprocessRedirectedTasksAfterStop() *gomock.Call
ReprocessRedirectedTasksAfterStop indicates an expected call of ReprocessRedirectedTasksAfterStop.
func (*MockphysicalTaskQueueManagerMockRecorder) SetupDraining ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) SetupDraining() *gomock.Call
SetupDraining indicates an expected call of SetupDraining.
func (*MockphysicalTaskQueueManagerMockRecorder) SpoolTask ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) SpoolTask(taskInfo any) *gomock.Call
SpoolTask indicates an expected call of SpoolTask.
func (*MockphysicalTaskQueueManagerMockRecorder) Start ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockphysicalTaskQueueManagerMockRecorder) StartScaleManager ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) StartScaleManager(arg0 any) *gomock.Call
StartScaleManager indicates an expected call of StartScaleManager.
func (*MockphysicalTaskQueueManagerMockRecorder) Stop ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) Stop(arg0 any) *gomock.Call
Stop indicates an expected call of Stop.
func (*MockphysicalTaskQueueManagerMockRecorder) TrySyncMatch ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) TrySyncMatch(ctx, task any) *gomock.Call
TrySyncMatch indicates an expected call of TrySyncMatch.
func (*MockphysicalTaskQueueManagerMockRecorder) UnloadFromPartitionManager ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) UnloadFromPartitionManager(arg0 any) *gomock.Call
UnloadFromPartitionManager indicates an expected call of UnloadFromPartitionManager.
func (*MockphysicalTaskQueueManagerMockRecorder) UpdatePollerInfo ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdatePollerInfo(arg0, arg1 any) *gomock.Call
UpdatePollerInfo indicates an expected call of UpdatePollerInfo.
func (*MockphysicalTaskQueueManagerMockRecorder) UpdateRemotePriorityBacklogs ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdateRemotePriorityBacklogs(arg0 any) *gomock.Call
UpdateRemotePriorityBacklogs indicates an expected call of UpdateRemotePriorityBacklogs.
func (*MockphysicalTaskQueueManagerMockRecorder) UpdateScaleState ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdateScaleState(arg0, arg1 any) *gomock.Call
UpdateScaleState indicates an expected call of UpdateScaleState.
func (*MockphysicalTaskQueueManagerMockRecorder) UserDataChanged ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) UserDataChanged() *gomock.Call
UserDataChanged indicates an expected call of UserDataChanged.
func (*MockphysicalTaskQueueManagerMockRecorder) WaitUntilInitialized ¶
func (mr *MockphysicalTaskQueueManagerMockRecorder) WaitUntilInitialized(arg0 any) *gomock.Call
WaitUntilInitialized indicates an expected call of WaitUntilInitialized.
type MockscaleDB ¶
type MockscaleDB struct {
// contains filtered or unexported fields
}
MockscaleDB is a mock of scaleDB interface.
func NewMockscaleDB ¶
func NewMockscaleDB(ctrl *gomock.Controller) *MockscaleDB
NewMockscaleDB creates a new mock instance.
func (*MockscaleDB) EXPECT ¶
func (m *MockscaleDB) EXPECT() *MockscaleDBMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockscaleDB) UpdateScaleState ¶
func (m *MockscaleDB) UpdateScaleState(arg0 *persistence.PartitionScaleState, arg1 bool) error
UpdateScaleState mocks base method.
type MockscaleDBMockRecorder ¶
type MockscaleDBMockRecorder struct {
// contains filtered or unexported fields
}
MockscaleDBMockRecorder is the mock recorder for MockscaleDB.
func (*MockscaleDBMockRecorder) UpdateScaleState ¶
func (mr *MockscaleDBMockRecorder) UpdateScaleState(arg0, arg1 any) *gomock.Call
UpdateScaleState indicates an expected call of UpdateScaleState.
type MocktaskQueuePartitionManager ¶
type MocktaskQueuePartitionManager struct {
// contains filtered or unexported fields
}
MocktaskQueuePartitionManager is a mock of taskQueuePartitionManager interface.
func NewMocktaskQueuePartitionManager ¶
func NewMocktaskQueuePartitionManager(ctrl *gomock.Controller) *MocktaskQueuePartitionManager
NewMocktaskQueuePartitionManager creates a new mock instance.
func (*MocktaskQueuePartitionManager) AddSpooledTask ¶
func (m *MocktaskQueuePartitionManager) AddSpooledTask(ctx context.Context, task *internalTask, backlogQueue *PhysicalTaskQueueKey) error
AddSpooledTask mocks base method.
func (*MocktaskQueuePartitionManager) AddTask ¶
func (m *MocktaskQueuePartitionManager) AddTask(ctx context.Context, params addTaskParams) (string, bool, error)
AddTask mocks base method.
func (*MocktaskQueuePartitionManager) Describe ¶
func (m *MocktaskQueuePartitionManager) Describe(ctx context.Context, buildIds map[string]bool, includeAllActive, reportStats, reportPollers, internalTaskQueueStatus, skipMarkAlive bool) (*matchingservice.DescribeTaskQueuePartitionResponse, error)
Describe mocks base method.
func (*MocktaskQueuePartitionManager) DispatchNexusTask ¶
func (m *MocktaskQueuePartitionManager) DispatchNexusTask(ctx context.Context, taskId string, request *matchingservice.DispatchNexusTaskRequest) (*matchingservice.DispatchNexusTaskResponse, error)
DispatchNexusTask mocks base method.
func (*MocktaskQueuePartitionManager) DispatchQueryTask ¶
func (m *MocktaskQueuePartitionManager) DispatchQueryTask(ctx context.Context, taskId string, request *matchingservice.QueryWorkflowRequest) (*matchingservice.QueryWorkflowResponse, error)
DispatchQueryTask mocks base method.
func (*MocktaskQueuePartitionManager) EXPECT ¶
func (m *MocktaskQueuePartitionManager) EXPECT() *MocktaskQueuePartitionManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MocktaskQueuePartitionManager) GetAllPollerInfo ¶
func (m *MocktaskQueuePartitionManager) GetAllPollerInfo() []*taskqueue.PollerInfo
GetAllPollerInfo mocks base method.
func (*MocktaskQueuePartitionManager) GetCache ¶
func (m *MocktaskQueuePartitionManager) GetCache(key any) any
GetCache mocks base method.
func (*MocktaskQueuePartitionManager) GetConfig ¶
func (m *MocktaskQueuePartitionManager) GetConfig() *taskQueueConfig
GetConfig mocks base method.
func (*MocktaskQueuePartitionManager) GetRateLimitManager ¶
func (m *MocktaskQueuePartitionManager) GetRateLimitManager() *rateLimitManager
GetRateLimitManager mocks base method.
func (*MocktaskQueuePartitionManager) GetUserDataManager ¶
func (m *MocktaskQueuePartitionManager) GetUserDataManager() userDataManager
GetUserDataManager mocks base method.
func (*MocktaskQueuePartitionManager) HasAnyPollerAfter ¶
func (m *MocktaskQueuePartitionManager) HasAnyPollerAfter(accessTime time.Time) bool
HasAnyPollerAfter mocks base method.
func (*MocktaskQueuePartitionManager) HasPollerAfter ¶
func (m *MocktaskQueuePartitionManager) HasPollerAfter(buildId string, accessTime time.Time) bool
HasPollerAfter mocks base method.
func (*MocktaskQueuePartitionManager) LegacyDescribeTaskQueue ¶
func (m *MocktaskQueuePartitionManager) LegacyDescribeTaskQueue(includeTaskQueueStatus bool) (*matchingservice.DescribeTaskQueueResponse, error)
LegacyDescribeTaskQueue mocks base method.
func (*MocktaskQueuePartitionManager) LongPollExpirationInterval ¶
func (m *MocktaskQueuePartitionManager) LongPollExpirationInterval() time.Duration
LongPollExpirationInterval mocks base method.
func (*MocktaskQueuePartitionManager) MarkAlive ¶
func (m *MocktaskQueuePartitionManager) MarkAlive()
MarkAlive mocks base method.
func (*MocktaskQueuePartitionManager) Namespace ¶
func (m *MocktaskQueuePartitionManager) Namespace() *namespace.Namespace
Namespace mocks base method.
func (*MocktaskQueuePartitionManager) Partition ¶
func (m *MocktaskQueuePartitionManager) Partition() tqid.Partition
Partition mocks base method.
func (*MocktaskQueuePartitionManager) PartitionCount ¶
func (m *MocktaskQueuePartitionManager) PartitionCount() int
PartitionCount mocks base method.
func (*MocktaskQueuePartitionManager) PollTask ¶
func (m *MocktaskQueuePartitionManager) PollTask(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, bool, error)
PollTask mocks base method.
func (*MocktaskQueuePartitionManager) ProcessSpooledTask ¶
func (m *MocktaskQueuePartitionManager) ProcessSpooledTask(ctx context.Context, task *internalTask, backlogQueue *PhysicalTaskQueueKey) error
ProcessSpooledTask mocks base method.
func (*MocktaskQueuePartitionManager) PutCache ¶
func (m *MocktaskQueuePartitionManager) PutCache(key, value any)
PutCache mocks base method.
func (*MocktaskQueuePartitionManager) RemovePoller ¶
func (m *MocktaskQueuePartitionManager) RemovePoller(identity pollerIdentity)
RemovePoller mocks base method.
func (*MocktaskQueuePartitionManager) Start ¶
func (m *MocktaskQueuePartitionManager) Start()
Start mocks base method.
func (*MocktaskQueuePartitionManager) Stop ¶
func (m *MocktaskQueuePartitionManager) Stop(arg0 unloadCause)
Stop mocks base method.
func (*MocktaskQueuePartitionManager) WaitUntilInitialized ¶
func (m *MocktaskQueuePartitionManager) WaitUntilInitialized(arg0 context.Context) error
WaitUntilInitialized mocks base method.
type MocktaskQueuePartitionManagerMockRecorder ¶
type MocktaskQueuePartitionManagerMockRecorder struct {
// contains filtered or unexported fields
}
MocktaskQueuePartitionManagerMockRecorder is the mock recorder for MocktaskQueuePartitionManager.
func (*MocktaskQueuePartitionManagerMockRecorder) AddSpooledTask ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) AddSpooledTask(ctx, task, backlogQueue any) *gomock.Call
AddSpooledTask indicates an expected call of AddSpooledTask.
func (*MocktaskQueuePartitionManagerMockRecorder) AddTask ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) AddTask(ctx, params any) *gomock.Call
AddTask indicates an expected call of AddTask.
func (*MocktaskQueuePartitionManagerMockRecorder) Describe ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) Describe(ctx, buildIds, includeAllActive, reportStats, reportPollers, internalTaskQueueStatus, skipMarkAlive any) *gomock.Call
Describe indicates an expected call of Describe.
func (*MocktaskQueuePartitionManagerMockRecorder) DispatchNexusTask ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) DispatchNexusTask(ctx, taskId, request any) *gomock.Call
DispatchNexusTask indicates an expected call of DispatchNexusTask.
func (*MocktaskQueuePartitionManagerMockRecorder) DispatchQueryTask ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) DispatchQueryTask(ctx, taskId, request any) *gomock.Call
DispatchQueryTask indicates an expected call of DispatchQueryTask.
func (*MocktaskQueuePartitionManagerMockRecorder) GetAllPollerInfo ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) GetAllPollerInfo() *gomock.Call
GetAllPollerInfo indicates an expected call of GetAllPollerInfo.
func (*MocktaskQueuePartitionManagerMockRecorder) GetCache ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) GetCache(key any) *gomock.Call
GetCache indicates an expected call of GetCache.
func (*MocktaskQueuePartitionManagerMockRecorder) GetConfig ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) GetConfig() *gomock.Call
GetConfig indicates an expected call of GetConfig.
func (*MocktaskQueuePartitionManagerMockRecorder) GetRateLimitManager ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) GetRateLimitManager() *gomock.Call
GetRateLimitManager indicates an expected call of GetRateLimitManager.
func (*MocktaskQueuePartitionManagerMockRecorder) GetUserDataManager ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) GetUserDataManager() *gomock.Call
GetUserDataManager indicates an expected call of GetUserDataManager.
func (*MocktaskQueuePartitionManagerMockRecorder) HasAnyPollerAfter ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) HasAnyPollerAfter(accessTime any) *gomock.Call
HasAnyPollerAfter indicates an expected call of HasAnyPollerAfter.
func (*MocktaskQueuePartitionManagerMockRecorder) HasPollerAfter ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) HasPollerAfter(buildId, accessTime any) *gomock.Call
HasPollerAfter indicates an expected call of HasPollerAfter.
func (*MocktaskQueuePartitionManagerMockRecorder) LegacyDescribeTaskQueue ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) LegacyDescribeTaskQueue(includeTaskQueueStatus any) *gomock.Call
LegacyDescribeTaskQueue indicates an expected call of LegacyDescribeTaskQueue.
func (*MocktaskQueuePartitionManagerMockRecorder) LongPollExpirationInterval ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) LongPollExpirationInterval() *gomock.Call
LongPollExpirationInterval indicates an expected call of LongPollExpirationInterval.
func (*MocktaskQueuePartitionManagerMockRecorder) MarkAlive ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) MarkAlive() *gomock.Call
MarkAlive indicates an expected call of MarkAlive.
func (*MocktaskQueuePartitionManagerMockRecorder) Namespace ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) Namespace() *gomock.Call
Namespace indicates an expected call of Namespace.
func (*MocktaskQueuePartitionManagerMockRecorder) Partition ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) Partition() *gomock.Call
Partition indicates an expected call of Partition.
func (*MocktaskQueuePartitionManagerMockRecorder) PartitionCount ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) PartitionCount() *gomock.Call
PartitionCount indicates an expected call of PartitionCount.
func (*MocktaskQueuePartitionManagerMockRecorder) PollTask ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) PollTask(ctx, pollMetadata any) *gomock.Call
PollTask indicates an expected call of PollTask.
func (*MocktaskQueuePartitionManagerMockRecorder) ProcessSpooledTask ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) ProcessSpooledTask(ctx, task, backlogQueue any) *gomock.Call
ProcessSpooledTask indicates an expected call of ProcessSpooledTask.
func (*MocktaskQueuePartitionManagerMockRecorder) PutCache ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) PutCache(key, value any) *gomock.Call
PutCache indicates an expected call of PutCache.
func (*MocktaskQueuePartitionManagerMockRecorder) RemovePoller ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) RemovePoller(identity any) *gomock.Call
RemovePoller indicates an expected call of RemovePoller.
func (*MocktaskQueuePartitionManagerMockRecorder) Start ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MocktaskQueuePartitionManagerMockRecorder) Stop ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) Stop(arg0 any) *gomock.Call
Stop indicates an expected call of Stop.
func (*MocktaskQueuePartitionManagerMockRecorder) WaitUntilInitialized ¶
func (mr *MocktaskQueuePartitionManagerMockRecorder) WaitUntilInitialized(arg0 any) *gomock.Call
WaitUntilInitialized indicates an expected call of WaitUntilInitialized.
type MocktaskValidator ¶
type MocktaskValidator struct {
// contains filtered or unexported fields
}
MocktaskValidator is a mock of taskValidator interface.
func NewMocktaskValidator ¶
func NewMocktaskValidator(ctrl *gomock.Controller) *MocktaskValidator
NewMocktaskValidator creates a new mock instance.
func (*MocktaskValidator) EXPECT ¶
func (m *MocktaskValidator) EXPECT() *MocktaskValidatorMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
type MocktaskValidatorMockRecorder ¶
type MocktaskValidatorMockRecorder struct {
// contains filtered or unexported fields
}
MocktaskValidatorMockRecorder is the mock recorder for MocktaskValidator.
type MockuserDataManager ¶
type MockuserDataManager struct {
// contains filtered or unexported fields
}
MockuserDataManager is a mock of userDataManager interface.
func NewMockuserDataManager ¶
func NewMockuserDataManager(ctrl *gomock.Controller) *MockuserDataManager
NewMockuserDataManager creates a new mock instance.
func (*MockuserDataManager) CheckTaskQueueUserDataPropagation ¶
func (m *MockuserDataManager) CheckTaskQueueUserDataPropagation(arg0 context.Context, arg1 int64, arg2, arg3 int) error
CheckTaskQueueUserDataPropagation mocks base method.
func (*MockuserDataManager) EXPECT ¶
func (m *MockuserDataManager) EXPECT() *MockuserDataManagerMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockuserDataManager) GetUserData ¶
func (m *MockuserDataManager) GetUserData() (*persistence.VersionedTaskQueueUserData, chan struct{}, error)
GetUserData mocks base method.
func (*MockuserDataManager) HandleGetUserDataRequest ¶
func (m *MockuserDataManager) HandleGetUserDataRequest(ctx context.Context, req *matchingservice.GetTaskQueueUserDataRequest) (*matchingservice.GetTaskQueueUserDataResponse, error)
HandleGetUserDataRequest mocks base method.
func (*MockuserDataManager) LocalBacklogPriorityChanged ¶
func (m *MockuserDataManager) LocalBacklogPriorityChanged(arg0 map[PhysicalTaskQueueVersion]int64)
LocalBacklogPriorityChanged mocks base method.
func (*MockuserDataManager) PartitionScale ¶
func (m *MockuserDataManager) PartitionScale() *taskqueue.PartitionScaleInfo
PartitionScale mocks base method.
func (*MockuserDataManager) SetPartitionScale ¶
func (m *MockuserDataManager) SetPartitionScale(arg0 *taskqueue.PartitionScaleInfo)
SetPartitionScale mocks base method.
func (*MockuserDataManager) UpdateUserData ¶
func (m *MockuserDataManager) UpdateUserData(ctx context.Context, options UserDataUpdateOptions, updateFn UserDataUpdateFunc) (int64, error)
UpdateUserData mocks base method.
func (*MockuserDataManager) WaitUntilInitialized ¶
func (m *MockuserDataManager) WaitUntilInitialized(ctx context.Context) error
WaitUntilInitialized mocks base method.
type MockuserDataManagerMockRecorder ¶
type MockuserDataManagerMockRecorder struct {
// contains filtered or unexported fields
}
MockuserDataManagerMockRecorder is the mock recorder for MockuserDataManager.
func (*MockuserDataManagerMockRecorder) CheckTaskQueueUserDataPropagation ¶
func (mr *MockuserDataManagerMockRecorder) CheckTaskQueueUserDataPropagation(arg0, arg1, arg2, arg3 any) *gomock.Call
CheckTaskQueueUserDataPropagation indicates an expected call of CheckTaskQueueUserDataPropagation.
func (*MockuserDataManagerMockRecorder) GetUserData ¶
func (mr *MockuserDataManagerMockRecorder) GetUserData() *gomock.Call
GetUserData indicates an expected call of GetUserData.
func (*MockuserDataManagerMockRecorder) HandleGetUserDataRequest ¶
func (mr *MockuserDataManagerMockRecorder) HandleGetUserDataRequest(ctx, req any) *gomock.Call
HandleGetUserDataRequest indicates an expected call of HandleGetUserDataRequest.
func (*MockuserDataManagerMockRecorder) LocalBacklogPriorityChanged ¶
func (mr *MockuserDataManagerMockRecorder) LocalBacklogPriorityChanged(arg0 any) *gomock.Call
LocalBacklogPriorityChanged indicates an expected call of LocalBacklogPriorityChanged.
func (*MockuserDataManagerMockRecorder) PartitionScale ¶
func (mr *MockuserDataManagerMockRecorder) PartitionScale() *gomock.Call
PartitionScale indicates an expected call of PartitionScale.
func (*MockuserDataManagerMockRecorder) SetPartitionScale ¶
func (mr *MockuserDataManagerMockRecorder) SetPartitionScale(arg0 any) *gomock.Call
SetPartitionScale indicates an expected call of SetPartitionScale.
func (*MockuserDataManagerMockRecorder) Start ¶
func (mr *MockuserDataManagerMockRecorder) Start() *gomock.Call
Start indicates an expected call of Start.
func (*MockuserDataManagerMockRecorder) Stop ¶
func (mr *MockuserDataManagerMockRecorder) Stop() *gomock.Call
Stop indicates an expected call of Stop.
func (*MockuserDataManagerMockRecorder) UpdateUserData ¶
func (mr *MockuserDataManagerMockRecorder) UpdateUserData(ctx, options, updateFn any) *gomock.Call
UpdateUserData indicates an expected call of UpdateUserData.
func (*MockuserDataManagerMockRecorder) WaitUntilInitialized ¶
func (mr *MockuserDataManagerMockRecorder) WaitUntilInitialized(ctx any) *gomock.Call
WaitUntilInitialized indicates an expected call of WaitUntilInitialized.
type PartitionScaler ¶
type PartitionScaler interface {
// OnTasks will be called once per batch of tasks added, either sync match or async. The
// NumTasks count may be estimated based on assumptions of load balancing across
// partitions.
//
// It will be given the current partition count target, current backlog counts, and its
// private state (optional). It returns a PartitionScalerDecision, which will usually be
// "no change". To make a change, it should return a number in NewTarget. Zero means
// disable managed scaling and requires BacklogCap to also be zero.
//
// Changes may be ignored if values are out of range, if changed too often, or other
// reasons. Private state will not be updated if target doesn't also change, or if the
// change is ignored due to rate limit or any other reason.
//
// It will also be called periodically with less than a full batch, or even zero, to allow
// timely scale down when there are no/few tasks.
OnTasks(PartitionScalerInput) PartitionScalerDecision
// Stop will be called when unloading the partition.
Stop()
}
PartitionScaler is an instance of a scaler for one task queue.
type PartitionScalerDecision ¶
type PartitionScalerDecision struct {
NoChange bool // if true, don't do anything
NewTarget int // if zero, disable managed scaling, otherwise set partition target
BacklogCap int // target cap for backlog count; must be zero when NewTarget is zero
PrivateState *anypb.Any // optional private state to be stored with target
}
type PartitionScalerFactory ¶
type PartitionScalerFactory interface {
// New will be called for a new root partition. It should return a new PartitionScaler
// (or nil to disable).
New(nsName namespace.Name, tqName string, tqType enumspb.TaskQueueType) PartitionScaler
}
PartitionScalerFactory is a pluggable interface to control partition scaling.
type PartitionScalerInput ¶
type PhysicalTaskQueueKey ¶
type PhysicalTaskQueueKey struct {
// contains filtered or unexported fields
}
PhysicalTaskQueueKey Each task queue partition corresponds to one or more "physical" (aka DB-level) task queues, each of which has a distinct physicalTaskQueueManager in memory in matching service, as well as a distinct identity in persistence.
Physical task queues with a version set or build ID are called "versioned". The ones without a version set or build ID are called "unversioned". A physical queue cannot have both version set and build ID.
func BuildIdQueueKey ¶
func BuildIdQueueKey(p tqid.Partition, buildId string) *PhysicalTaskQueueKey
BuildIdQueueKey returns a PhysicalTaskQueueKey of a task queue partition with the given build ID.
func DeploymentQueueKey ¶
func DeploymentQueueKey(p tqid.Partition, deployment *deploymentpb.Deployment) *PhysicalTaskQueueKey
DeploymentQueueKey returns a PhysicalTaskQueueKey of a task queue partition for a deployment.
func UnversionedQueueKey ¶
func UnversionedQueueKey(p tqid.Partition) *PhysicalTaskQueueKey
UnversionedQueueKey returns the unversioned PhysicalTaskQueueKey of a task queue partition
func VersionSetQueueKey ¶
func VersionSetQueueKey(p tqid.Partition, versionSet string) *PhysicalTaskQueueKey
VersionSetQueueKey returns a PhysicalTaskQueueKey of a task queue partition with the given version set id.
func (*PhysicalTaskQueueKey) IsVersioned ¶
func (q *PhysicalTaskQueueKey) IsVersioned() bool
func (*PhysicalTaskQueueKey) NamespaceId ¶
func (q *PhysicalTaskQueueKey) NamespaceId() string
func (*PhysicalTaskQueueKey) Partition ¶
func (q *PhysicalTaskQueueKey) Partition() tqid.Partition
func (*PhysicalTaskQueueKey) PersistenceName ¶
func (q *PhysicalTaskQueueKey) PersistenceName() string
PersistenceName returns the unique name for this DB queue to be used in persistence.
Unversioned DB use the RPC name of the partition, i.e.:
sticky: <sticky name> unversioned and root: <base name> unversioned: /_sys/<base name>/<partition id>
All versioned DB queues use mangled names, using the following format:
with build ID: /_sys/<base name>/<deployment name base64 URL encoded>|<build ID base64 URL encoded>#<partition id> with build ID: /_sys/<base name>/<build ID base64 URL encoded>#<partition id> with version set: /_sys/<base name>/<version set id>:<partition id>
func (*PhysicalTaskQueueKey) TaskQueueFamily ¶
func (q *PhysicalTaskQueueKey) TaskQueueFamily() *tqid.TaskQueueFamily
func (*PhysicalTaskQueueKey) TaskType ¶
func (q *PhysicalTaskQueueKey) TaskType() enumspb.TaskQueueType
func (*PhysicalTaskQueueKey) Version ¶
func (q *PhysicalTaskQueueKey) Version() PhysicalTaskQueueVersion
Version returns a pointer to the physical queue version key. Caller must not manipulate the returned value.
type PhysicalTaskQueueVersion ¶
type PhysicalTaskQueueVersion struct {
// contains filtered or unexported fields
}
func (PhysicalTaskQueueVersion) BuildId ¶
func (v PhysicalTaskQueueVersion) BuildId() string
BuildId returns empty if this is not a Versioning v2 queue.
func (PhysicalTaskQueueVersion) Deployment ¶
func (v PhysicalTaskQueueVersion) Deployment() *deploymentpb.Deployment
func (PhysicalTaskQueueVersion) IsVersioned ¶
func (v PhysicalTaskQueueVersion) IsVersioned() bool
func (PhysicalTaskQueueVersion) MetricsTagValue ¶
func (v PhysicalTaskQueueVersion) MetricsTagValue() string
MetricsTagValue returns the build ID tag value for this version.
func (PhysicalTaskQueueVersion) VersionSet ¶
func (v PhysicalTaskQueueVersion) VersionSet() string
func (PhysicalTaskQueueVersion) WorkerDeploymentVersionS ¶
func (v PhysicalTaskQueueVersion) WorkerDeploymentVersionS() *deploymentspb.WorkerDeploymentVersion
WorkerDeploymentVersionS returns the internal server api WorkerDeploymentVersion (different from the public api WorkerDeploymentVersion).
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents the matching service
func NewService ¶
func NewService( server *grpc.Server, serviceConfig *Config, logger log.SnTaggedLogger, membershipMonitor membership.Monitor, grpcListener net.Listener, runtimeMetricsReporter *metrics.RuntimeMetricsReporter, handler *Handler, metricsHandler metrics.Handler, healthServer *health.Server, visibilityManager manager.VisibilityManager, ) *Service
type TaskDispatchRateLimiter ¶
type TaskDispatchRateLimiter quotas.RequestRateLimiter
type TaskMatcher ¶
type TaskMatcher struct {
// contains filtered or unexported fields
}
TaskMatcher matches a task producer with a task consumer Producers are usually rpc calls from history or taskReader that drains backlog from db. Consumers are the task queue pollers
func (*TaskMatcher) HasWaitingPoller ¶
func (tm *TaskMatcher) HasWaitingPoller() bool
HasWaitingPoller returns true if it there's a poller ready and waiting this is mostly useful in testing to avoid test races on setup
func (*TaskMatcher) MustOffer ¶
func (tm *TaskMatcher) MustOffer(ctx context.Context, task *internalTask, interruptCh <-chan struct{}) error
MustOffer blocks until a consumer is found to handle this task Returns error only when context is canceled or the ratelimit is set to zero (allow nothing) The passed in context MUST NOT have a deadline associated with it Note that calling MustOffer is the only way that matcher knows there are spooled tasks in the backlog, in absence of a pending MustOffer call, the forwarding logic assumes that backlog is empty.
func (*TaskMatcher) Offer ¶
func (tm *TaskMatcher) Offer(ctx context.Context, task *internalTask) (bool, error)
Offer offers a task to a potential consumer (poller) If the task is successfully matched with a consumer, this method will return true and no error. If the task is matched but consumer returned error, then this method will return true and error message. This method should not be used for query task. This method should ONLY be used for sync match.
When a local poller is not available and forwarding to a parent task queue partition is possible, this method will attempt forwarding to the parent partition.
Cases when this method will block:
Ratelimit: When a ratelimit token is not available, this method might block waiting for a token until the provided context timeout. Rate limits are not enforced for forwarded tasks from child partition.
Forwarded tasks that originated from db backlog: When this method is called with a task that is forwarded from a remote partition and if (1) this task queue is root (2) task was from db backlog - this method will block until context timeout trying to match with a poller. The caller is expected to set the correct context timeout.
returns error when:
- ratelimit is exceeded (does not apply to query task)
- context deadline is exceeded
- task is matched and consumer returns error in response channel
func (*TaskMatcher) OfferNexusTask ¶
func (tm *TaskMatcher) OfferNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)
OfferNexusTask either matchs a task to a local poller or forwards it if no local pollers available. Local match is always attempted before forwarding. If local match occurs response and error are both nil, if forwarding occurs then response or error is returned.
func (*TaskMatcher) OfferQuery ¶
func (tm *TaskMatcher) OfferQuery(ctx context.Context, task *internalTask) (*matchingservice.QueryWorkflowResponse, error)
OfferQuery will either match task to local poller or will forward query task. Local match is always attempted before forwarding is attempted. If local match occurs response and error are both nil, if forwarding occurs then response or error is returned.
func (*TaskMatcher) Poll ¶
func (tm *TaskMatcher) Poll(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
Poll blocks until a task is found or context deadline is exceeded On success, the returned task could be a query task or a regular task Returns errNoTasks when context deadline is exceeded
func (*TaskMatcher) PollForQuery ¶
func (tm *TaskMatcher) PollForQuery(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)
PollForQuery blocks until a *query* task is found or context deadline is exceeded Returns errNoTasks when context deadline is exceeded
func (*TaskMatcher) ReprocessAllTasks ¶
func (tm *TaskMatcher) ReprocessAllTasks()
func (*TaskMatcher) Start ¶
func (tm *TaskMatcher) Start()
func (*TaskMatcher) Stop ¶
func (tm *TaskMatcher) Stop()
type TaskQueueRateLimitFractionProvider ¶
type TaskQueueRateLimitFractionProvider interface {
GetRateLimitFraction(nsName namespace.Name, tqName string, tqType enumspb.TaskQueueType) float64
}
TaskQueueRateLimitFractionProvider returns the fraction of the rate limit for a task queue. The returned fraction is always clamped to [0.0, 1.0].
func NewTaskQueueRateLimitFractionProvider ¶
func NewTaskQueueRateLimitFractionProvider(inner TaskQueueRateLimitFractionProvider) TaskQueueRateLimitFractionProvider
NewTaskQueueRateLimitFractionProvider wraps inner and enforces [0.0, 1.0] on every call.
type TaskQueueRateLimitFractionProviderFunc ¶
type TaskQueueRateLimitFractionProviderFunc func(nsName namespace.Name, tqName string, tqType enumspb.TaskQueueType) float64
TaskQueueRateLimitFractionProviderFunc is a function that implements TaskQueueRateLimitFractionProvider.
func (TaskQueueRateLimitFractionProviderFunc) GetRateLimitFraction ¶
func (f TaskQueueRateLimitFractionProviderFunc) GetRateLimitFraction(nsName namespace.Name, tqName string, tqType enumspb.TaskQueueType) float64
type TaskQueueReplicatorNamespaceReplicationQueue ¶
type TaskQueueReplicatorNamespaceReplicationQueue persistence.NamespaceReplicationQueue
TaskQueueReplicatorNamespaceReplicationQueue is used to ensure the replicator only gets set if global namespaces are enabled on this cluster. See NamespaceReplicationQueueProvider below.
func NamespaceReplicationQueueProvider ¶
func NamespaceReplicationQueueProvider( namespaceReplicationQueue persistence.NamespaceReplicationQueue, clusterMetadata cluster.Metadata, ) TaskQueueReplicatorNamespaceReplicationQueue
type UserDataOnChangeFunc ¶
type UserDataOnChangeFunc func(to *persistencespb.VersionedTaskQueueUserData)
type UserDataUpdateFunc ¶
type UserDataUpdateFunc func(*persistencespb.TaskQueueUserData) (*persistencespb.TaskQueueUserData, bool, error)
UserDataUpdateFunc accepts the current user data for a task queue and returns the updated user data, a boolean indicating whether this data should be replicated, and an error. Extra care should be taken to avoid mutating the current user data to avoid keeping uncommitted data in memory.
type UserDataUpdateOptions ¶
Source Files
¶
- ack_manager.go
- backlog_age_tracker.go
- backlog_manager.go
- bits.go
- config.go
- db.go
- deployment_util.go
- fair_backlog_manager.go
- fair_level.go
- fair_task_reader.go
- fair_task_writer.go
- fairness_util.go
- forwarder.go
- fx.go
- handler.go
- liveness.go
- loadcause_string_gen.go
- matcher.go
- matcher_data.go
- matching_engine.go
- matching_engine_interfaces.go
- metrics_util.go
- nexus_endpoint_client.go
- partition_scaler_interface.go
- partition_scaler_mock.go
- physical_task_queue_key.go
- physical_task_queue_manager.go
- physical_task_queue_manager_interface.go
- physical_task_queue_manager_mock.go
- poller_history.go
- pri_backlog_manager.go
- pri_forwarder.go
- pri_matcher.go
- pri_metrics_handler.go
- pri_task_reader.go
- pri_task_writer.go
- rate_limit_fraction_provider.go
- ratelimit_manager.go
- reachability.go
- scale_manager.go
- scale_manager_mock.go
- service.go
- simple_partition_scaler.go
- task.go
- task_gc.go
- task_queue_partition_manager.go
- task_queue_partition_manager_interface.go
- task_queue_partition_manager_mock.go
- task_reader.go
- task_tracker.go
- task_validation.go
- task_validation_mock.go
- task_writer.go
- unloadcause_string_gen.go
- user_data_manager.go
- user_data_manager_mock.go
- version_rule_helpers.go
- version_sets.go
- version_sets_merge.go