matching

package
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 111 Imported by: 0

README

Documentation

Overview

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.

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBlackholedQuery = "" /* 510-byte string literal not displayed */

)
View Source
var (
	ErrInvalidPersistenceName = errors.New("invalid persistence name")
)

Functions

func AddCompatibleRedirectRule added in v1.2.0

func AddCompatibleRedirectRule(timestamp *hlc.Clock,
	data *persistencespb.VersioningData,
	req *workflowservice.UpdateWorkerVersioningRulesRequest_AddCompatibleBuildIdRedirectRule,
	maxRedirectRules,
	maxUpstreamBuildIds int) (*persistencespb.VersioningData, error)

func CleanupRuleTombstones added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

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:

  1. 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.
  2. Removes all previously added assignment rules to the given target Build ID (if any).
  3. Removes any *fully-ramped* assignment rule for other Build IDs.

func ErrorHandlerProvider added in v1.2.0

func ErrorHandlerProvider(
	logger log.Logger,
	serviceConfig *Config,
) *interceptor.RequestErrorHandler

func FindAssignmentBuildId added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

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 added in v1.2.0

func GetTimestampedWorkerVersioningRules(
	versioningData *persistencespb.VersioningData,
	clk *hlc.Clock,
) (*matchingservice.GetWorkerVersioningRulesResponse, error)

func IsTaskExpired added in v1.2.0

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 added in v1.2.0

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 PersistUnknownBuildId added in v1.2.0

func PersistUnknownBuildId(clock *hlc.Clock, data *persistencespb.VersioningData, buildId string) *persistencespb.VersioningData

func PersistenceRateLimitingParamsProvider added in v1.2.0

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 added in v1.2.0

func RateLimitInterceptorProvider(
	serviceConfig *Config,
) *interceptor.RateLimitInterceptor

func RemoveBuildIds added in v1.2.0

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 RetryableInterceptorProvider added in v1.2.0

func RetryableInterceptorProvider() *interceptor.RetryableInterceptor

func ServerProvider added in v1.2.0

func ServerProvider(grpcServerOptions []grpc.ServerOption) *grpc.Server

func ServiceLifetimeHooks added in v1.2.0

func ServiceLifetimeHooks(lc fx.Lifecycle, svc *Service)

func ServiceResolverProvider added in v1.2.0

func ServiceResolverProvider(
	membershipMonitor membership.Monitor,
) (membership.ServiceResolver, error)

func TelemetryInterceptorProvider added in v1.2.0

func TelemetryInterceptorProvider(
	logger log.Logger,
	namespaceRegistry namespace.Registry,
	metricsHandler metrics.Handler,
	serviceConfig *Config,
	requestErrorHandler *interceptor.RequestErrorHandler,
) *interceptor.TelemetryInterceptor

func ThrottledLoggerRpsFnProvider added in v1.2.0

func ThrottledLoggerRpsFnProvider(serviceConfig *Config) resource.ThrottledLoggerRpsFn

func ToBuildIdOrderingResponse added in v1.2.0

ToBuildIdOrderingResponse transforms the internal VersioningData representation to public representation. If maxSets is given, the last sets up to maxSets will be returned.

func UpdateVersionSets added in v1.2.0

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:

  1. Add a new version possibly as the new overall default version, creating a new set.
  2. Add a new version, compatible with some existing version, adding it to that existing set and making it the new default for that set.
  3. 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 added in v1.2.0

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)

func WorkersRegistryProvider added in v1.2.0

func WorkersRegistryProvider(
	lc fx.Lifecycle,
	metricsHandler metrics.Handler,
	serviceConfig *Config,
) workers.Registry

Types

type Config added in v0.3.0

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
	OperatorRPSRatio                     dynamicconfig.FloatPropertyFn
	AlignMembershipChange                dynamicconfig.DurationPropertyFn
	ShutdownDrainDuration                dynamicconfig.DurationPropertyFn
	HistoryMaxPageSize                   dynamicconfig.IntPropertyFnWithNamespaceFilter
	SendRawHistoryBytesToMatchingService dynamicconfig.BoolPropertyFn
	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]]
	EnableMigration                          dynamicconfig.BoolPropertyFnWithTaskQueueFilter
	AutoEnableV2                             dynamicconfig.BoolPropertyFnWithTaskQueueFilter
	GetTasksBatchSize                        dynamicconfig.IntPropertyFnWithTaskQueueFilter
	GetTasksReloadAt                         dynamicconfig.IntPropertyFnWithTaskQueueFilter
	UpdateAckInterval                        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
	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
	QueryPollerUnavailableWindow             dynamicconfig.DurationPropertyFn
	EmitTaskDispatchLatencyAtPoll            dynamicconfig.BoolPropertyFnWithTaskQueueFilter
	QueryWorkflowTaskTimeoutLogRate          dynamicconfig.FloatPropertyFnWithTaskQueueFilter
	MembershipUnloadDelay                    dynamicconfig.DurationPropertyFn
	TaskQueueInfoByBuildIdTTL                dynamicconfig.DurationPropertyFnWithTaskQueueFilter
	PriorityLevels                           dynamicconfig.IntPropertyFnWithTaskQueueFilter

	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
	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

	FairnessCounter dynamicconfig.TypedPropertyFnWithTaskQueueFilter[counter.CounterParams]

	LogAllReqErrors dynamicconfig.BoolPropertyFnWithNamespaceFilter
}

Config represents configuration for matching service

func ConfigProvider added in v1.2.0

func ConfigProvider(
	dc *dynamicconfig.Collection,
	persistenceConfig config.Persistence,
) *Config

func NewConfig added in v0.3.0

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)
	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,
) Engine

NewEngine creates an instance of matching engine

type EphemeralDataChangeFunc added in v1.2.0

type EphemeralDataChangeFunc func(*taskqueuespb.EphemeralData)

type Forwarder added in v0.7.0

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 added in v0.7.0

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 added in v1.2.0

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 added in v0.7.0

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 added in v0.7.0

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 added in v0.7.0

func (fwdr *Forwarder) ForwardTask(ctx context.Context, task *internalTask) error

ForwardTask forwards an activity or workflow task to the parent task queue partition if it exists

func (*Forwarder) PollReqTokenC added in v0.7.0

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 added in v0.7.0

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 added in v1.2.0

func (h *Handler) AddWorkflowTask(
	ctx context.Context,
	request *matchingservice.AddWorkflowTaskRequest,
) (_ *matchingservice.AddWorkflowTaskResponse, retError error)

AddWorkflowTask - adds a workflow task.

func (*Handler) ApplyTaskQueueUserDataReplicationEvent added in v1.2.0

func (*Handler) CancelOutstandingPoll added in v0.3.2

CancelOutstandingPoll is used to cancel outstanding pollers

func (*Handler) CancelOutstandingWorkerPolls added in v1.2.0

CancelOutstandingWorkerPolls cancels all outstanding polls for a given worker instance key.

func (*Handler) CheckTaskQueueUserDataPropagation added in v1.2.0

func (*Handler) CheckTaskQueueVersionMembership added in v1.2.0

func (*Handler) CreateNexusEndpoint added in v1.2.0

func (*Handler) DeleteNexusEndpoint added in v1.2.0

func (*Handler) DescribeTaskQueue added in v1.2.0

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 added in v1.2.0

DescribeTaskQueuePartition returns information about the target task queue partition.

func (*Handler) DescribeVersionedTaskQueues added in v1.2.0

func (*Handler) DescribeWorker added in v1.2.0

func (*Handler) DispatchNexusTask added in v1.2.0

func (*Handler) ForceLoadTaskQueuePartition added in v1.2.0

func (*Handler) ForceUnloadTaskQueue added in v1.2.0

func (*Handler) ForceUnloadTaskQueuePartition added in v1.2.0

func (*Handler) GetBuildIdTaskQueueMapping added in v1.2.0

func (*Handler) GetTaskQueueUserData added in v1.2.0

func (*Handler) GetWorkerBuildIdCompatibility added in v1.2.0

GetWorkerBuildIdCompatibility fetches the worker versioning data for a task queue

func (*Handler) GetWorkerVersioningRules added in v1.2.0

GetWorkerVersioningRules fetches the Build ID assignment and redirect rules for a Task Queue

func (*Handler) ListNexusEndpoints added in v1.2.0

func (*Handler) ListTaskQueuePartitions added in v1.2.0

ListTaskQueuePartitions returns information about partitions for a taskQueue

func (*Handler) ListWorkers added in v1.2.0

ListWorkers retrieves a list of workers in the specified namespace that match the provided filters.

func (*Handler) PollActivityTaskQueue added in v1.2.0

PollActivityTaskQueue - long poll for an activity task.

func (*Handler) PollNexusTaskQueue added in v1.2.0

func (*Handler) PollWorkflowTaskQueue added in v1.2.0

PollWorkflowTaskQueue - long poll for a workflow task.

func (*Handler) QueryWorkflow added in v0.3.2

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 added in v1.2.0

RecordWorkerHeartbeat receive heartbeat request from the worker.

func (*Handler) ReplicateTaskQueueUserData added in v1.2.0

func (*Handler) RespondNexusTaskCompleted added in v1.2.0

func (*Handler) RespondNexusTaskFailed added in v1.2.0

func (*Handler) RespondQueryTaskCompleted added in v0.3.2

RespondQueryTaskCompleted responds a query task completed

func (*Handler) Start

func (h *Handler) Start()

Start starts the handler

func (*Handler) Stop

func (h *Handler) Stop()

Stop stops the handler

func (*Handler) SyncDeploymentUserData added in v1.2.0

func (*Handler) UpdateFairnessState added in v1.2.0

func (*Handler) UpdateNexusEndpoint added in v1.2.0

func (*Handler) UpdateTaskQueueConfig added in v1.2.0

func (*Handler) UpdateTaskQueueUserData added in v1.2.0

func (*Handler) UpdateWorkerBuildIdCompatibility added in v1.2.0

UpdateWorkerBuildIdCompatibility allows changing the worker versioning graph for a task queue

func (*Handler) UpdateWorkerVersioningRules added in v1.2.0

UpdateWorkerVersioningRules allows updating the Build ID assignment and redirect rules for a given Task Queue.

type HandlerParams added in v1.2.0

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
}

type MockphysicalTaskQueueManager added in v1.2.0

type MockphysicalTaskQueueManager struct {
	// contains filtered or unexported fields
}

MockphysicalTaskQueueManager is a mock of physicalTaskQueueManager interface.

func NewMockphysicalTaskQueueManager added in v1.2.0

func NewMockphysicalTaskQueueManager(ctrl *gomock.Controller) *MockphysicalTaskQueueManager

NewMockphysicalTaskQueueManager creates a new mock instance.

func (*MockphysicalTaskQueueManager) AddSpooledTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) AddSpooledTask(task *internalTask) error

AddSpooledTask mocks base method.

func (*MockphysicalTaskQueueManager) AddSpooledTaskToMatcher added in v1.2.0

func (m *MockphysicalTaskQueueManager) AddSpooledTaskToMatcher(task *internalTask) error

AddSpooledTaskToMatcher mocks base method.

func (*MockphysicalTaskQueueManager) DispatchNexusTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) DispatchNexusTask(ctx context.Context, task *internalTask) (*matchingservice.DispatchNexusTaskResponse, error)

DispatchNexusTask mocks base method.

func (*MockphysicalTaskQueueManager) DispatchQueryTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) DispatchQueryTask(ctx context.Context, task *internalTask) (*matchingservice.QueryWorkflowResponse, error)

DispatchQueryTask mocks base method.

func (*MockphysicalTaskQueueManager) DispatchSpooledTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) DispatchSpooledTask(ctx context.Context, task *internalTask, userDataChanged <-chan struct{}) error

DispatchSpooledTask mocks base method.

func (*MockphysicalTaskQueueManager) EXPECT added in v1.2.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockphysicalTaskQueueManager) FinishedDraining added in v1.2.0

func (m *MockphysicalTaskQueueManager) FinishedDraining()

FinishedDraining mocks base method.

func (*MockphysicalTaskQueueManager) GetAllPollerInfo added in v1.2.0

func (m *MockphysicalTaskQueueManager) GetAllPollerInfo() []*taskqueue.PollerInfo

GetAllPollerInfo mocks base method.

func (*MockphysicalTaskQueueManager) GetFairnessWeightOverrides added in v1.2.0

func (m *MockphysicalTaskQueueManager) GetFairnessWeightOverrides() fairnessWeightOverrides

GetFairnessWeightOverrides mocks base method.

func (*MockphysicalTaskQueueManager) GetInternalTaskQueueStatus added in v1.2.0

func (m *MockphysicalTaskQueueManager) GetInternalTaskQueueStatus() []*taskqueue0.InternalTaskQueueStatus

GetInternalTaskQueueStatus mocks base method.

func (*MockphysicalTaskQueueManager) GetStatsByPriority added in v1.2.0

func (m *MockphysicalTaskQueueManager) GetStatsByPriority(includeRates bool) map[int32]*taskqueue.TaskQueueStats

GetStatsByPriority mocks base method.

func (*MockphysicalTaskQueueManager) HasPollerAfter added in v1.2.0

func (m *MockphysicalTaskQueueManager) HasPollerAfter(accessTime time.Time) bool

HasPollerAfter mocks base method.

func (*MockphysicalTaskQueueManager) LegacyDescribeTaskQueue added in v1.2.0

func (m *MockphysicalTaskQueueManager) LegacyDescribeTaskQueue(includeTaskQueueStatus bool) *matchingservice.DescribeTaskQueueResponse

LegacyDescribeTaskQueue mocks base method.

func (*MockphysicalTaskQueueManager) MakePollerScalingDecision added in v1.2.0

func (m *MockphysicalTaskQueueManager) MakePollerScalingDecision(ctx context.Context, pollStartTime time.Time) *taskqueue.PollerScalingDecision

MakePollerScalingDecision mocks base method.

func (*MockphysicalTaskQueueManager) MarkAlive added in v1.2.0

func (m *MockphysicalTaskQueueManager) MarkAlive()

MarkAlive mocks base method.

func (*MockphysicalTaskQueueManager) PollTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) PollTask(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, error)

PollTask mocks base method.

func (*MockphysicalTaskQueueManager) ProcessSpooledTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) ProcessSpooledTask(ctx context.Context, task *internalTask) error

ProcessSpooledTask mocks base method.

func (*MockphysicalTaskQueueManager) QueueKey added in v1.2.0

QueueKey mocks base method.

func (*MockphysicalTaskQueueManager) RemovePoller added in v1.2.0

func (m *MockphysicalTaskQueueManager) RemovePoller(arg0 pollerIdentity)

RemovePoller mocks base method.

func (*MockphysicalTaskQueueManager) ReprocessRedirectedTasksAfterStop added in v1.2.0

func (m *MockphysicalTaskQueueManager) ReprocessRedirectedTasksAfterStop()

ReprocessRedirectedTasksAfterStop mocks base method.

func (*MockphysicalTaskQueueManager) SetupDraining added in v1.2.0

func (m *MockphysicalTaskQueueManager) SetupDraining()

SetupDraining mocks base method.

func (*MockphysicalTaskQueueManager) SpoolTask added in v1.2.0

func (m *MockphysicalTaskQueueManager) SpoolTask(taskInfo *persistence.TaskInfo) error

SpoolTask mocks base method.

func (*MockphysicalTaskQueueManager) Start added in v1.2.0

func (m *MockphysicalTaskQueueManager) Start()

Start mocks base method.

func (*MockphysicalTaskQueueManager) Stop added in v1.2.0

func (m *MockphysicalTaskQueueManager) Stop(arg0 unloadCause)

Stop mocks base method.

func (*MockphysicalTaskQueueManager) TrySyncMatch added in v1.2.0

func (m *MockphysicalTaskQueueManager) TrySyncMatch(ctx context.Context, task *internalTask) (bool, error)

TrySyncMatch mocks base method.

func (*MockphysicalTaskQueueManager) UnloadFromPartitionManager added in v1.2.0

func (m *MockphysicalTaskQueueManager) UnloadFromPartitionManager(arg0 unloadCause)

UnloadFromPartitionManager mocks base method.

func (*MockphysicalTaskQueueManager) UpdatePollerInfo added in v1.2.0

func (m *MockphysicalTaskQueueManager) UpdatePollerInfo(arg0 pollerIdentity, arg1 *pollMetadata)

UpdatePollerInfo mocks base method.

func (*MockphysicalTaskQueueManager) UpdateRemotePriorityBacklogs added in v1.2.0

func (m *MockphysicalTaskQueueManager) UpdateRemotePriorityBacklogs(arg0 remotePriorityBacklogSet)

UpdateRemotePriorityBacklogs mocks base method.

func (*MockphysicalTaskQueueManager) UserDataChanged added in v1.2.0

func (m *MockphysicalTaskQueueManager) UserDataChanged()

UserDataChanged mocks base method.

func (*MockphysicalTaskQueueManager) WaitUntilInitialized added in v1.2.0

func (m *MockphysicalTaskQueueManager) WaitUntilInitialized(arg0 context.Context) error

WaitUntilInitialized mocks base method.

type MockphysicalTaskQueueManagerMockRecorder added in v1.2.0

type MockphysicalTaskQueueManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MockphysicalTaskQueueManagerMockRecorder is the mock recorder for MockphysicalTaskQueueManager.

func (*MockphysicalTaskQueueManagerMockRecorder) AddSpooledTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) AddSpooledTask(task any) *gomock.Call

AddSpooledTask indicates an expected call of AddSpooledTask.

func (*MockphysicalTaskQueueManagerMockRecorder) AddSpooledTaskToMatcher added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) AddSpooledTaskToMatcher(task any) *gomock.Call

AddSpooledTaskToMatcher indicates an expected call of AddSpooledTaskToMatcher.

func (*MockphysicalTaskQueueManagerMockRecorder) DispatchNexusTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchNexusTask(ctx, task any) *gomock.Call

DispatchNexusTask indicates an expected call of DispatchNexusTask.

func (*MockphysicalTaskQueueManagerMockRecorder) DispatchQueryTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchQueryTask(ctx, task any) *gomock.Call

DispatchQueryTask indicates an expected call of DispatchQueryTask.

func (*MockphysicalTaskQueueManagerMockRecorder) DispatchSpooledTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) DispatchSpooledTask(ctx, task, userDataChanged any) *gomock.Call

DispatchSpooledTask indicates an expected call of DispatchSpooledTask.

func (*MockphysicalTaskQueueManagerMockRecorder) FinishedDraining added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) FinishedDraining() *gomock.Call

FinishedDraining indicates an expected call of FinishedDraining.

func (*MockphysicalTaskQueueManagerMockRecorder) GetAllPollerInfo added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) GetAllPollerInfo() *gomock.Call

GetAllPollerInfo indicates an expected call of GetAllPollerInfo.

func (*MockphysicalTaskQueueManagerMockRecorder) GetFairnessWeightOverrides added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) GetFairnessWeightOverrides() *gomock.Call

GetFairnessWeightOverrides indicates an expected call of GetFairnessWeightOverrides.

func (*MockphysicalTaskQueueManagerMockRecorder) GetInternalTaskQueueStatus added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) GetInternalTaskQueueStatus() *gomock.Call

GetInternalTaskQueueStatus indicates an expected call of GetInternalTaskQueueStatus.

func (*MockphysicalTaskQueueManagerMockRecorder) GetStatsByPriority added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) GetStatsByPriority(includeRates any) *gomock.Call

GetStatsByPriority indicates an expected call of GetStatsByPriority.

func (*MockphysicalTaskQueueManagerMockRecorder) HasPollerAfter added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) HasPollerAfter(accessTime any) *gomock.Call

HasPollerAfter indicates an expected call of HasPollerAfter.

func (*MockphysicalTaskQueueManagerMockRecorder) LegacyDescribeTaskQueue added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) LegacyDescribeTaskQueue(includeTaskQueueStatus any) *gomock.Call

LegacyDescribeTaskQueue indicates an expected call of LegacyDescribeTaskQueue.

func (*MockphysicalTaskQueueManagerMockRecorder) MakePollerScalingDecision added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) MakePollerScalingDecision(ctx, pollStartTime any) *gomock.Call

MakePollerScalingDecision indicates an expected call of MakePollerScalingDecision.

func (*MockphysicalTaskQueueManagerMockRecorder) MarkAlive added in v1.2.0

MarkAlive indicates an expected call of MarkAlive.

func (*MockphysicalTaskQueueManagerMockRecorder) PollTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) PollTask(ctx, pollMetadata any) *gomock.Call

PollTask indicates an expected call of PollTask.

func (*MockphysicalTaskQueueManagerMockRecorder) ProcessSpooledTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) ProcessSpooledTask(ctx, task any) *gomock.Call

ProcessSpooledTask indicates an expected call of ProcessSpooledTask.

func (*MockphysicalTaskQueueManagerMockRecorder) QueueKey added in v1.2.0

QueueKey indicates an expected call of QueueKey.

func (*MockphysicalTaskQueueManagerMockRecorder) RemovePoller added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) RemovePoller(arg0 any) *gomock.Call

RemovePoller indicates an expected call of RemovePoller.

func (*MockphysicalTaskQueueManagerMockRecorder) ReprocessRedirectedTasksAfterStop added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) ReprocessRedirectedTasksAfterStop() *gomock.Call

ReprocessRedirectedTasksAfterStop indicates an expected call of ReprocessRedirectedTasksAfterStop.

func (*MockphysicalTaskQueueManagerMockRecorder) SetupDraining added in v1.2.0

SetupDraining indicates an expected call of SetupDraining.

func (*MockphysicalTaskQueueManagerMockRecorder) SpoolTask added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) SpoolTask(taskInfo any) *gomock.Call

SpoolTask indicates an expected call of SpoolTask.

func (*MockphysicalTaskQueueManagerMockRecorder) Start added in v1.2.0

Start indicates an expected call of Start.

func (*MockphysicalTaskQueueManagerMockRecorder) Stop added in v1.2.0

Stop indicates an expected call of Stop.

func (*MockphysicalTaskQueueManagerMockRecorder) TrySyncMatch added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) TrySyncMatch(ctx, task any) *gomock.Call

TrySyncMatch indicates an expected call of TrySyncMatch.

func (*MockphysicalTaskQueueManagerMockRecorder) UnloadFromPartitionManager added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) UnloadFromPartitionManager(arg0 any) *gomock.Call

UnloadFromPartitionManager indicates an expected call of UnloadFromPartitionManager.

func (*MockphysicalTaskQueueManagerMockRecorder) UpdatePollerInfo added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdatePollerInfo(arg0, arg1 any) *gomock.Call

UpdatePollerInfo indicates an expected call of UpdatePollerInfo.

func (*MockphysicalTaskQueueManagerMockRecorder) UpdateRemotePriorityBacklogs added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) UpdateRemotePriorityBacklogs(arg0 any) *gomock.Call

UpdateRemotePriorityBacklogs indicates an expected call of UpdateRemotePriorityBacklogs.

func (*MockphysicalTaskQueueManagerMockRecorder) UserDataChanged added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) UserDataChanged() *gomock.Call

UserDataChanged indicates an expected call of UserDataChanged.

func (*MockphysicalTaskQueueManagerMockRecorder) WaitUntilInitialized added in v1.2.0

func (mr *MockphysicalTaskQueueManagerMockRecorder) WaitUntilInitialized(arg0 any) *gomock.Call

WaitUntilInitialized indicates an expected call of WaitUntilInitialized.

type MocktaskQueuePartitionManager added in v1.2.0

type MocktaskQueuePartitionManager struct {
	// contains filtered or unexported fields
}

MocktaskQueuePartitionManager is a mock of taskQueuePartitionManager interface.

func NewMocktaskQueuePartitionManager added in v1.2.0

func NewMocktaskQueuePartitionManager(ctrl *gomock.Controller) *MocktaskQueuePartitionManager

NewMocktaskQueuePartitionManager creates a new mock instance.

func (*MocktaskQueuePartitionManager) AddSpooledTask added in v1.2.0

func (m *MocktaskQueuePartitionManager) AddSpooledTask(ctx context.Context, task *internalTask, backlogQueue *PhysicalTaskQueueKey) error

AddSpooledTask mocks base method.

func (*MocktaskQueuePartitionManager) AddTask added in v1.2.0

func (m *MocktaskQueuePartitionManager) AddTask(ctx context.Context, params addTaskParams) (string, bool, error)

AddTask mocks base method.

func (*MocktaskQueuePartitionManager) Describe added in v1.2.0

func (m *MocktaskQueuePartitionManager) Describe(ctx context.Context, buildIds map[string]bool, includeAllActive, reportStats, reportPollers, internalTaskQueueStatus bool) (*matchingservice.DescribeTaskQueuePartitionResponse, error)

Describe mocks base method.

func (*MocktaskQueuePartitionManager) DispatchNexusTask added in v1.2.0

DispatchNexusTask mocks base method.

func (*MocktaskQueuePartitionManager) DispatchQueryTask added in v1.2.0

DispatchQueryTask mocks base method.

func (*MocktaskQueuePartitionManager) EXPECT added in v1.2.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MocktaskQueuePartitionManager) GetAllPollerInfo added in v1.2.0

func (m *MocktaskQueuePartitionManager) GetAllPollerInfo() []*taskqueue.PollerInfo

GetAllPollerInfo mocks base method.

func (*MocktaskQueuePartitionManager) GetCache added in v1.2.0

func (m *MocktaskQueuePartitionManager) GetCache(key any) any

GetCache mocks base method.

func (*MocktaskQueuePartitionManager) GetConfig added in v1.2.0

func (m *MocktaskQueuePartitionManager) GetConfig() *taskQueueConfig

GetConfig mocks base method.

func (*MocktaskQueuePartitionManager) GetRateLimitManager added in v1.2.0

func (m *MocktaskQueuePartitionManager) GetRateLimitManager() *rateLimitManager

GetRateLimitManager mocks base method.

func (*MocktaskQueuePartitionManager) GetUserDataManager added in v1.2.0

func (m *MocktaskQueuePartitionManager) GetUserDataManager() userDataManager

GetUserDataManager mocks base method.

func (*MocktaskQueuePartitionManager) HasAnyPollerAfter added in v1.2.0

func (m *MocktaskQueuePartitionManager) HasAnyPollerAfter(accessTime time.Time) bool

HasAnyPollerAfter mocks base method.

func (*MocktaskQueuePartitionManager) HasPollerAfter added in v1.2.0

func (m *MocktaskQueuePartitionManager) HasPollerAfter(buildId string, accessTime time.Time) bool

HasPollerAfter mocks base method.

func (*MocktaskQueuePartitionManager) LegacyDescribeTaskQueue added in v1.2.0

func (m *MocktaskQueuePartitionManager) LegacyDescribeTaskQueue(includeTaskQueueStatus bool) (*matchingservice.DescribeTaskQueueResponse, error)

LegacyDescribeTaskQueue mocks base method.

func (*MocktaskQueuePartitionManager) LongPollExpirationInterval added in v1.2.0

func (m *MocktaskQueuePartitionManager) LongPollExpirationInterval() time.Duration

LongPollExpirationInterval mocks base method.

func (*MocktaskQueuePartitionManager) MarkAlive added in v1.2.0

func (m *MocktaskQueuePartitionManager) MarkAlive()

MarkAlive mocks base method.

func (*MocktaskQueuePartitionManager) Namespace added in v1.2.0

Namespace mocks base method.

func (*MocktaskQueuePartitionManager) Partition added in v1.2.0

Partition mocks base method.

func (*MocktaskQueuePartitionManager) PartitionCount added in v1.2.0

func (m *MocktaskQueuePartitionManager) PartitionCount() int

PartitionCount mocks base method.

func (*MocktaskQueuePartitionManager) PollTask added in v1.2.0

func (m *MocktaskQueuePartitionManager) PollTask(ctx context.Context, pollMetadata *pollMetadata) (*internalTask, bool, error)

PollTask mocks base method.

func (*MocktaskQueuePartitionManager) ProcessSpooledTask added in v1.2.0

func (m *MocktaskQueuePartitionManager) ProcessSpooledTask(ctx context.Context, task *internalTask, backlogQueue *PhysicalTaskQueueKey) error

ProcessSpooledTask mocks base method.

func (*MocktaskQueuePartitionManager) PutCache added in v1.2.0

func (m *MocktaskQueuePartitionManager) PutCache(key, value any)

PutCache mocks base method.

func (*MocktaskQueuePartitionManager) RemovePoller added in v1.2.0

func (m *MocktaskQueuePartitionManager) RemovePoller(identity pollerIdentity)

RemovePoller mocks base method.

func (*MocktaskQueuePartitionManager) Start added in v1.2.0

func (m *MocktaskQueuePartitionManager) Start()

Start mocks base method.

func (*MocktaskQueuePartitionManager) Stop added in v1.2.0

func (m *MocktaskQueuePartitionManager) Stop(arg0 unloadCause)

Stop mocks base method.

func (*MocktaskQueuePartitionManager) WaitUntilInitialized added in v1.2.0

func (m *MocktaskQueuePartitionManager) WaitUntilInitialized(arg0 context.Context) error

WaitUntilInitialized mocks base method.

type MocktaskQueuePartitionManagerMockRecorder added in v1.2.0

type MocktaskQueuePartitionManagerMockRecorder struct {
	// contains filtered or unexported fields
}

MocktaskQueuePartitionManagerMockRecorder is the mock recorder for MocktaskQueuePartitionManager.

func (*MocktaskQueuePartitionManagerMockRecorder) AddSpooledTask added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) AddSpooledTask(ctx, task, backlogQueue any) *gomock.Call

AddSpooledTask indicates an expected call of AddSpooledTask.

func (*MocktaskQueuePartitionManagerMockRecorder) AddTask added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) AddTask(ctx, params any) *gomock.Call

AddTask indicates an expected call of AddTask.

func (*MocktaskQueuePartitionManagerMockRecorder) Describe added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) Describe(ctx, buildIds, includeAllActive, reportStats, reportPollers, internalTaskQueueStatus any) *gomock.Call

Describe indicates an expected call of Describe.

func (*MocktaskQueuePartitionManagerMockRecorder) DispatchNexusTask added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) DispatchNexusTask(ctx, taskId, request any) *gomock.Call

DispatchNexusTask indicates an expected call of DispatchNexusTask.

func (*MocktaskQueuePartitionManagerMockRecorder) DispatchQueryTask added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) DispatchQueryTask(ctx, taskId, request any) *gomock.Call

DispatchQueryTask indicates an expected call of DispatchQueryTask.

func (*MocktaskQueuePartitionManagerMockRecorder) GetAllPollerInfo added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) GetAllPollerInfo() *gomock.Call

GetAllPollerInfo indicates an expected call of GetAllPollerInfo.

func (*MocktaskQueuePartitionManagerMockRecorder) GetCache added in v1.2.0

GetCache indicates an expected call of GetCache.

func (*MocktaskQueuePartitionManagerMockRecorder) GetConfig added in v1.2.0

GetConfig indicates an expected call of GetConfig.

func (*MocktaskQueuePartitionManagerMockRecorder) GetRateLimitManager added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) GetRateLimitManager() *gomock.Call

GetRateLimitManager indicates an expected call of GetRateLimitManager.

func (*MocktaskQueuePartitionManagerMockRecorder) GetUserDataManager added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) GetUserDataManager() *gomock.Call

GetUserDataManager indicates an expected call of GetUserDataManager.

func (*MocktaskQueuePartitionManagerMockRecorder) HasAnyPollerAfter added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) HasAnyPollerAfter(accessTime any) *gomock.Call

HasAnyPollerAfter indicates an expected call of HasAnyPollerAfter.

func (*MocktaskQueuePartitionManagerMockRecorder) HasPollerAfter added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) HasPollerAfter(buildId, accessTime any) *gomock.Call

HasPollerAfter indicates an expected call of HasPollerAfter.

func (*MocktaskQueuePartitionManagerMockRecorder) LegacyDescribeTaskQueue added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) LegacyDescribeTaskQueue(includeTaskQueueStatus any) *gomock.Call

LegacyDescribeTaskQueue indicates an expected call of LegacyDescribeTaskQueue.

func (*MocktaskQueuePartitionManagerMockRecorder) LongPollExpirationInterval added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) LongPollExpirationInterval() *gomock.Call

LongPollExpirationInterval indicates an expected call of LongPollExpirationInterval.

func (*MocktaskQueuePartitionManagerMockRecorder) MarkAlive added in v1.2.0

MarkAlive indicates an expected call of MarkAlive.

func (*MocktaskQueuePartitionManagerMockRecorder) Namespace added in v1.2.0

Namespace indicates an expected call of Namespace.

func (*MocktaskQueuePartitionManagerMockRecorder) Partition added in v1.2.0

Partition indicates an expected call of Partition.

func (*MocktaskQueuePartitionManagerMockRecorder) PartitionCount added in v1.2.0

PartitionCount indicates an expected call of PartitionCount.

func (*MocktaskQueuePartitionManagerMockRecorder) PollTask added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) PollTask(ctx, pollMetadata any) *gomock.Call

PollTask indicates an expected call of PollTask.

func (*MocktaskQueuePartitionManagerMockRecorder) ProcessSpooledTask added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) ProcessSpooledTask(ctx, task, backlogQueue any) *gomock.Call

ProcessSpooledTask indicates an expected call of ProcessSpooledTask.

func (*MocktaskQueuePartitionManagerMockRecorder) PutCache added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) PutCache(key, value any) *gomock.Call

PutCache indicates an expected call of PutCache.

func (*MocktaskQueuePartitionManagerMockRecorder) RemovePoller added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) RemovePoller(identity any) *gomock.Call

RemovePoller indicates an expected call of RemovePoller.

func (*MocktaskQueuePartitionManagerMockRecorder) Start added in v1.2.0

Start indicates an expected call of Start.

func (*MocktaskQueuePartitionManagerMockRecorder) Stop added in v1.2.0

Stop indicates an expected call of Stop.

func (*MocktaskQueuePartitionManagerMockRecorder) WaitUntilInitialized added in v1.2.0

func (mr *MocktaskQueuePartitionManagerMockRecorder) WaitUntilInitialized(arg0 any) *gomock.Call

WaitUntilInitialized indicates an expected call of WaitUntilInitialized.

type MocktaskValidator added in v1.2.0

type MocktaskValidator struct {
	// contains filtered or unexported fields
}

MocktaskValidator is a mock of taskValidator interface.

func NewMocktaskValidator added in v1.2.0

func NewMocktaskValidator(ctrl *gomock.Controller) *MocktaskValidator

NewMocktaskValidator creates a new mock instance.

func (*MocktaskValidator) EXPECT added in v1.2.0

EXPECT returns an object that allows the caller to indicate expected use.

type MocktaskValidatorMockRecorder added in v1.2.0

type MocktaskValidatorMockRecorder struct {
	// contains filtered or unexported fields
}

MocktaskValidatorMockRecorder is the mock recorder for MocktaskValidator.

type PhysicalTaskQueueKey added in v1.2.0

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 added in v1.2.0

func BuildIdQueueKey(p tqid.Partition, buildId string) *PhysicalTaskQueueKey

BuildIdQueueKey returns a PhysicalTaskQueueKey of a task queue partition with the given build ID.

func DeploymentQueueKey added in v1.2.0

func DeploymentQueueKey(p tqid.Partition, deployment *deploymentpb.Deployment) *PhysicalTaskQueueKey

DeploymentQueueKey returns a PhysicalTaskQueueKey of a task queue partition for a deployment.

func UnversionedQueueKey added in v1.2.0

func UnversionedQueueKey(p tqid.Partition) *PhysicalTaskQueueKey

UnversionedQueueKey returns the unversioned PhysicalTaskQueueKey of a task queue partition

func VersionSetQueueKey added in v1.2.0

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 added in v1.2.0

func (q *PhysicalTaskQueueKey) IsVersioned() bool

func (*PhysicalTaskQueueKey) NamespaceId added in v1.2.0

func (q *PhysicalTaskQueueKey) NamespaceId() string

func (*PhysicalTaskQueueKey) Partition added in v1.2.0

func (q *PhysicalTaskQueueKey) Partition() tqid.Partition

func (*PhysicalTaskQueueKey) PersistenceName added in v1.2.0

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 added in v1.2.0

func (q *PhysicalTaskQueueKey) TaskQueueFamily() *tqid.TaskQueueFamily

func (*PhysicalTaskQueueKey) TaskType added in v1.2.0

func (*PhysicalTaskQueueKey) Version added in v1.2.0

Version returns a pointer to the physical queue version key. Caller must not manipulate the returned value.

type PhysicalTaskQueueVersion added in v1.2.0

type PhysicalTaskQueueVersion struct {
	// contains filtered or unexported fields
}

func (PhysicalTaskQueueVersion) BuildId added in v1.2.0

func (v PhysicalTaskQueueVersion) BuildId() string

BuildId returns empty if this is not a Versioning v2 queue.

func (PhysicalTaskQueueVersion) Deployment added in v1.2.0

func (PhysicalTaskQueueVersion) IsVersioned added in v1.2.0

func (v PhysicalTaskQueueVersion) IsVersioned() bool

func (PhysicalTaskQueueVersion) MetricsTagValue added in v1.2.0

func (v PhysicalTaskQueueVersion) MetricsTagValue() string

MetricsTagValue returns the build ID tag value for this version.

func (PhysicalTaskQueueVersion) VersionSet added in v1.2.0

func (v PhysicalTaskQueueVersion) VersionSet() string

func (PhysicalTaskQueueVersion) WorkerDeploymentVersionS added in v1.2.0

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

func (*Service) Start

func (s *Service) Start()

Start starts the service

func (*Service) Stop

func (s *Service) Stop()

Stop stops the service

type TaskDispatchRateLimiter added in v1.2.0

type TaskDispatchRateLimiter quotas.RequestRateLimiter

type TaskMatcher added in v0.6.0

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) MustOffer added in v0.6.0

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 added in v0.6.0

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 added in v1.2.0

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 added in v0.7.0

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 added in v0.6.0

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 added in v0.6.0

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 added in v1.2.0

func (tm *TaskMatcher) ReprocessAllTasks()

func (*TaskMatcher) Start added in v1.2.0

func (tm *TaskMatcher) Start()

func (*TaskMatcher) Stop added in v1.2.0

func (tm *TaskMatcher) Stop()

type TaskQueueReplicatorNamespaceReplicationQueue added in v1.2.0

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 added in v1.2.0

func NamespaceReplicationQueueProvider(
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	clusterMetadata cluster.Metadata,
) TaskQueueReplicatorNamespaceReplicationQueue

type UserDataOnChangeFunc added in v1.2.0

type UserDataOnChangeFunc func(to *persistencespb.VersionedTaskQueueUserData)

type UserDataUpdateFunc added in v1.2.0

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 added in v1.2.0

type UserDataUpdateOptions struct {
	TaskQueueLimitPerBuildId int
	// Only perform the update if current version equals to supplied version.
	// 0 is unset.
	KnownVersion int64
	Source       string // informative source for logging
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL