frontend

package
v1.32.1 Latest Latest
Warning

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

Go to latest
Published: Oct 15, 2026 License: MIT Imports: 176 Imported by: 0

Documentation

Overview

Package frontend is a generated GoMock package.

This whole file exists because grpc-gateway's runtime.JSONPb doesn't support indentation

Index

Constants

View Source
const (
	WorkflowServiceName = "temporal.api.workflowservice.v1.WorkflowService"
	OperatorServiceName = "temporal.api.operatorservice.v1.OperatorService"
	AdminServiceName    = "temporal.api.adminservice.v1.AdminService"
)
View Source
const (
	// ChasmSchedulerExperiment is the experiment name for enabling CHASM (V2) scheduler
	ChasmSchedulerExperiment = "chasm-scheduler"
)
View Source
const VersionCheckInterval = 24 * time.Hour

Variables

View Source
var EndpointNameRegex = regexp.MustCompile(`^[a-zA-Z][a-zA-Z0-9\-]*[a-zA-Z0-9]$`)

EndpointNameRegex is the regular expression that endpoint names must match.

View Source
var Module = fx.Options(
	resource.Module,
	chasmtests.Module,
	scheduler.Module,
	workerdeployment.Module,

	fx.Provide(MuxRouterProvider),
	fx.Provide(ConfigProvider),
	fx.Provide(ServiceErrorInterceptorProvider),
	fx.Provide(NamespaceLogInterceptorProvider),
	fx.Provide(NamespaceHandoverInterceptorProvider),
	fx.Provide(interceptor.NewRoutingKeyExtractor),
	fx.Provide(BusinessIDInterceptorProvider),
	fx.Provide(RedirectionInterceptorProvider),
	fx.Provide(ErrorHandlerProvider),
	fx.Provide(TelemetryInterceptorProvider),
	fx.Provide(RetryableInterceptorProvider),
	fx.Provide(RateLimitInterceptorProvider),
	fx.Provide(interceptor.NewHealthInterceptor),
	fx.Provide(NamespaceCountLimitInterceptorProvider),
	fx.Provide(NamespaceValidatorInterceptorProvider),
	fx.Provide(NamespaceRateLimitersProvider),
	fx.Provide(NamespaceRateLimitInterceptorProvider),
	fx.Provide(SDKVersionInterceptorProvider),
	fx.Provide(CallerInfoInterceptorProvider),
	fx.Provide(SlowRequestLoggerInterceptorProvider),
	fx.Provide(MaskInternalErrorDetailsInterceptorProvider),
	fx.Provide(ContextMetadataInterceptorProvider),
	fx.Provide(GrpcServerOptionsProvider),
	fx.Provide(VisibilityManagerProvider),
	fx.Provide(ThrottledLoggerRpsFnProvider),
	fx.Provide(PersistenceRateLimitingParamsProvider),
	service.PersistenceLazyLoadedServiceResolverModule,
	fx.Provide(FEReplicatorNamespaceReplicationQueueProvider),
	fx.Provide(nsreplication.NewNoopDataMerger),
	fx.Provide(nsreplication.NewDefaultAdmitter),
	fx.Provide(AuthorizationInterceptorProvider),
	fx.Provide(NamespaceCheckerProvider),
	fx.Provide(func(so GrpcServerOptions) *grpc.Server { return grpc.NewServer(so.Options...) }),
	fx.Provide(callbackValidatorProvider),
	fx.Provide(HandlerProvider),
	fx.Provide(AdminHandlerProvider),
	fx.Provide(NamespaceDLQHandlerProvider),
	fx.Provide(OperatorHandlerProvider),
	fx.Provide(NewVersionChecker),
	fx.Provide(ServiceResolverProvider),
	fx.Provide(newNexusCompletionHandler),
	fx.Provide(NewNexusOperationHTTPHandler),
	fx.Provide(newNexusCompletionHTTPHandler),
	fx.Invoke(RegisterNexusOperationHTTPHandler),
	fx.Invoke(RegisterNexusCompletionHTTPHandler),
	fx.Invoke(RegisterOpenAPIHTTPHandler),
	fx.Provide(HTTPAPIServerProvider),
	fx.Provide(NewServiceProvider),
	fx.Provide(NexusEndpointClientProvider),
	fx.Invoke(ServiceLifetimeHooks),
	fx.Provide(nexusoperationpb.NewNexusOperationServiceLayeredClient),
	fx.Provide(schedulerpb.NewSchedulerServiceLayeredClient),
	fx.Provide(chasmnexus.NewFrontendHandler),
	chasmnexus.Module,
	chasmscheduler.Module,
	chasmworkflow.Module,
	callback.Module,
	activity.FrontendModule,
	fx.Provide(visibility.ChasmVisibilityManagerProvider),
	fx.Provide(chasm.ChasmVisibilityInterceptorProvider),
)

Functions

func AuthorizationInterceptorProvider

func AuthorizationInterceptorProvider(
	cfg *config.Config,
	serviceConfig *Config,
	logger log.Logger,
	namespaceChecker authorization.NamespaceChecker,
	metricsHandler metrics.Handler,
	authorizer authorization.Authorizer,
	claimMapper authorization.ClaimMapper,
	audienceGetter authorization.JWTAudienceMapper,
	dc *dynamicconfig.Collection,
) *authorization.Interceptor

func BusinessIDInterceptorProvider

func BusinessIDInterceptorProvider(
	extractor interceptor.RoutingKeyExtractor,
	logger log.Logger,
) *interceptor.RoutingKeyInterceptor

func CallerInfoInterceptorProvider

func CallerInfoInterceptorProvider(
	namespaceRegistry namespace.Registry,
) *interceptor.CallerInfoInterceptor

func ContextMetadataInterceptorProvider

func ContextMetadataInterceptorProvider(
	logger log.Logger,
	dc *dynamicconfig.Collection,
) *interceptor.ContextMetadataInterceptor

func ErrorHandlerProvider

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

func MaskInternalErrorDetailsInterceptorProvider

func MaskInternalErrorDetailsInterceptorProvider(
	logger log.Logger,
	serviceConfig *Config,
	namespaceRegistry namespace.Registry,
) *interceptor.MaskInternalErrorDetailsInterceptor

func MuxRouterProvider

func MuxRouterProvider() *mux.Router

func NamespaceCheckerProvider

func NamespaceCheckerProvider(registry namespace.Registry) authorization.NamespaceChecker

func NamespaceCountLimitInterceptorProvider

func NamespaceCountLimitInterceptorProvider(
	serviceConfig *Config,
	namespaceRegistry namespace.Registry,
	serviceResolver membership.ServiceResolver,
	logger log.SnTaggedLogger,
) *interceptor.ConcurrentRequestLimitInterceptor

func NamespaceDLQHandlerProvider

func NamespaceDLQHandlerProvider(
	clusterMetadata cluster.Metadata,
	persistenceMetadataManager persistence.MetadataManager,
	namespaceDataMerger nsreplication.NamespaceDataMerger,
	namespaceAdmitter nsreplication.NamespaceReplicationAdmitter,
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	logger log.SnTaggedLogger,
	testHooks testhooks.TestHooks,
) nsreplication.DLQMessageHandler

NamespaceDLQHandlerProvider provides the default namespace DLQ message handler.

func NamespaceLogInterceptorProvider

func NamespaceLogInterceptorProvider(
	namespaceLogger resource.NamespaceLogger,
	namespaceRegistry namespace.Registry,
) *interceptor.NamespaceLogInterceptor

func NamespaceRateLimitInterceptorProvider

func NamespaceRateLimitInterceptorProvider(
	namespaceRegistry namespace.Registry,
	rateLimiters NamespaceRateLimiters,
	serviceConfig *Config,
	metricsHandler metrics.Handler,
) interceptor.NamespaceRateLimitInterceptor

func PersistenceRateLimitingParamsProvider

func PersistenceRateLimitingParamsProvider(
	serviceConfig *Config,
	persistenceLazyLoadedServiceResolver service.PersistenceLazyLoadedServiceResolver,
	logger log.SnTaggedLogger,
) service.PersistenceRateLimitingParams

func RateLimitInterceptorProvider

func RateLimitInterceptorProvider(
	serviceConfig *Config,
	frontendServiceResolver membership.ServiceResolver,
	handler metrics.Handler,
	logger log.SnTaggedLogger,
) *interceptor.RateLimitInterceptor

func RedirectionInterceptorProvider

func RedirectionInterceptorProvider(
	configuration *Config,
	namespaceCache namespace.Registry,
	policy config.DCRedirectionPolicy,
	logger log.Logger,
	clientBean client.Bean,
	metricsHandler metrics.Handler,
	timeSource clock.TimeSource,
	clusterMetadata cluster.Metadata,
) *interceptor.Redirection

func RegisterNexusCompletionHTTPHandler

func RegisterNexusCompletionHTTPHandler(
	h *nexusCompletionHTTPHandler,
	router *mux.Router,
)

func RegisterNexusOperationHTTPHandler

func RegisterNexusOperationHTTPHandler(
	h *NexusOperationHTTPHandler,
	router *mux.Router,
)

func RetryableInterceptorProvider

func RetryableInterceptorProvider() *interceptor.RetryableInterceptor

func SDKVersionInterceptorProvider

func SDKVersionInterceptorProvider() *interceptor.SDKVersionInterceptor

func ServiceErrorInterceptorProvider

func ServiceErrorInterceptorProvider(
	dc *dynamicconfig.Collection,
	metricsHandler metrics.Handler,
	logger log.Logger,
) *interceptor.ServiceErrorInterceptor

func ServiceLifetimeHooks

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

func ServiceResolverProvider

func ServiceResolverProvider(
	membershipMonitor membership.Monitor,
	serviceName primitives.ServiceName,
) (membership.ServiceResolver, error)

func SlowRequestLoggerInterceptorProvider

func SlowRequestLoggerInterceptorProvider(
	logger log.Logger,
	dc *dynamicconfig.Collection,
) *interceptor.SlowRequestLoggerInterceptor

func TelemetryInterceptorProvider

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

func ThrottledLoggerRpsFnProvider

func ThrottledLoggerRpsFnProvider(serviceConfig *Config) resource.ThrottledLoggerRpsFn

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 ActivityHandler

type ActivityHandler = activity.FrontendHandler

ActivityHandler is the activity frontend handler, aliased to avoid embedding name collision.

type AdminHandler

type AdminHandler struct {
	adminservice.UnimplementedAdminServiceServer
	// contains filtered or unexported fields
}

AdminHandler - gRPC handler interface for adminservice

func AdminHandlerProvider

func AdminHandlerProvider(
	persistenceConfig *config.Persistence,
	configuration *Config,
	replicatorNamespaceReplicationQueue FEReplicatorNamespaceReplicationQueue,
	visibilityMgr manager.VisibilityManager,
	logger log.SnTaggedLogger,
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	taskManager persistence.TaskManager,
	fairTaskManager persistence.FairTaskManager,
	persistenceExecutionManager persistence.ExecutionManager,
	clusterMetadataManager persistence.ClusterMetadataManager,
	persistenceMetadataManager persistence.MetadataManager,
	clientFactory client.Factory,
	historyClient resource.HistoryClient,
	sdkClientFactory sdk.ClientFactory,
	membershipMonitor membership.Monitor,
	hostInfoProvider membership.HostInfoProvider,
	namespaceRegistry namespace.Registry,
	saMapperProvider searchattribute.MapperProvider,
	saValidator *searchattribute.Validator,
	clusterMetadata cluster.Metadata,
	healthServer *health.Server,
	eventSerializer serialization.Serializer,
	timeSource clock.TimeSource,
	taskCategoryRegistry tasks.TaskCategoryRegistry,
	matchingClient resource.MatchingClient,
	chasmRegistry *chasm.Registry,
	namespaceDataMerger nsreplication.NamespaceDataMerger,
	schedulerClient schedulerpb.SchedulerServiceClient,
	namespaceDLQHandler nsreplication.DLQMessageHandler,
) *AdminHandler

func NewAdminHandler

func NewAdminHandler(
	args NewAdminHandlerArgs,
	namespaceDLQHandler nsreplication.DLQMessageHandler,
) *AdminHandler

NewAdminHandler creates a gRPC handler for the adminservice

func (*AdminHandler) AddOrUpdateRemoteCluster

func (adh *AdminHandler) AddOrUpdateRemoteCluster(
	ctx context.Context,
	request *adminservice.AddOrUpdateRemoteClusterRequest,
) (_ *adminservice.AddOrUpdateRemoteClusterResponse, retError error)

AddOrUpdateRemoteCluster TODO: Remove this API after migrate tctl to use operator handler

func (*AdminHandler) AddSearchAttributes

func (adh *AdminHandler) AddSearchAttributes(
	ctx context.Context,
	request *adminservice.AddSearchAttributesRequest,
) (_ *adminservice.AddSearchAttributesResponse, retError error)

AddSearchAttributes add search attribute to the cluster.

func (*AdminHandler) AddTasks

AddTasks just translates the admin service's request proto into a history service request proto and then sends it.

func (*AdminHandler) CancelDLQJob

func (*AdminHandler) CloseShard

func (adh *AdminHandler) CloseShard(ctx context.Context, request *adminservice.CloseShardRequest) (_ *adminservice.CloseShardResponse, retError error)

CloseShard returns information about the internal states of a history host

func (*AdminHandler) DeepHealthCheck

func (*AdminHandler) DeleteWorkflowExecution

func (*AdminHandler) DescribeCluster

func (adh *AdminHandler) DescribeCluster(
	ctx context.Context,
	request *adminservice.DescribeClusterRequest,
) (_ *adminservice.DescribeClusterResponse, retError error)

DescribeCluster return information about a temporal cluster

func (*AdminHandler) DescribeDLQJob

func (*AdminHandler) DescribeHistoryHost

DescribeHistoryHost returns information about the internal states of a history host

func (*AdminHandler) DescribeMutableState

DescribeMutableState returns information about the specified workflow execution.

func (*AdminHandler) DescribeTaskQueuePartition

DescribeTaskQueuePartition returns information for a given task queue partition of the task queue

func (*AdminHandler) ForceUnloadTaskQueuePartition

ForceUnloadTaskQueuePartition forcefully unloads a given task queue partition

func (*AdminHandler) GetDLQMessages

func (adh *AdminHandler) GetDLQMessages(
	ctx context.Context,
	request *adminservice.GetDLQMessagesRequest,
) (resp *adminservice.GetDLQMessagesResponse, retErr error)

GetDLQMessages reads messages from DLQ

func (*AdminHandler) GetDLQReplicationMessages

GetDLQReplicationMessages returns new replication tasks based on the dlq info.

func (*AdminHandler) GetDLQTasks

func (*AdminHandler) GetNamespace

func (*AdminHandler) GetNamespaceReplicationMessages

GetNamespaceReplicationMessages returns new namespace replication tasks since last retrieved task ID.

func (*AdminHandler) GetReplicationMessages

GetReplicationMessages returns new replication tasks since the read level provided in the token.

func (*AdminHandler) GetSearchAttributes

func (adh *AdminHandler) GetSearchAttributes(
	ctx context.Context,
	request *adminservice.GetSearchAttributesRequest,
) (_ *adminservice.GetSearchAttributesResponse, retError error)

func (*AdminHandler) GetShard

func (adh *AdminHandler) GetShard(ctx context.Context, request *adminservice.GetShardRequest) (_ *adminservice.GetShardResponse, retError error)

GetShard returns information about the internal states of a shard

func (*AdminHandler) GetTaskQueueTasks

GetTaskQueueTasks returns tasks from task queue

func (*AdminHandler) GetTaskQueueUserData

func (*AdminHandler) GetWorkflowExecutionRawHistory

func (*AdminHandler) GetWorkflowExecutionRawHistoryV2

GetWorkflowExecutionRawHistoryV2 - retrieves the history of workflow execution

func (*AdminHandler) ImportWorkflowExecution

func (adh *AdminHandler) ImportWorkflowExecution(
	ctx context.Context,
	request *adminservice.ImportWorkflowExecutionRequest,
) (_ *adminservice.ImportWorkflowExecutionResponse, retError error)

func (*AdminHandler) ListClusterMembers

func (adh *AdminHandler) ListClusterMembers(
	ctx context.Context,
	request *adminservice.ListClusterMembersRequest,
) (_ *adminservice.ListClusterMembersResponse, retError error)

ListClusterMembers TODO: Remove this API after migrate tctl to use operator handler

func (*AdminHandler) ListClusters

func (adh *AdminHandler) ListClusters(
	ctx context.Context,
	request *adminservice.ListClustersRequest,
) (_ *adminservice.ListClustersResponse, retError error)

ListClusters return information about temporal clusters TODO: Remove this API after migrate tctl to use operator handler

func (*AdminHandler) ListHistoryTasks

func (adh *AdminHandler) ListHistoryTasks(
	ctx context.Context,
	request *adminservice.ListHistoryTasksRequest,
) (_ *adminservice.ListHistoryTasksResponse, retError error)

func (*AdminHandler) ListQueues

func (*AdminHandler) MergeDLQMessages

func (adh *AdminHandler) MergeDLQMessages(
	ctx context.Context,
	request *adminservice.MergeDLQMessagesRequest,
) (resp *adminservice.MergeDLQMessagesResponse, err error)

MergeDLQMessages merges DLQ messages

func (*AdminHandler) MergeDLQTasks

func (*AdminHandler) MigrateSchedule

func (*AdminHandler) PurgeDLQMessages

PurgeDLQMessages purge messages from DLQ

func (*AdminHandler) PurgeDLQTasks

func (*AdminHandler) ReapplyEvents

func (adh *AdminHandler) ReapplyEvents(ctx context.Context, request *adminservice.ReapplyEventsRequest) (_ *adminservice.ReapplyEventsResponse, retError error)

ReapplyEvents applies stale events to the current workflow and the current run

func (*AdminHandler) RebuildMutableState

func (adh *AdminHandler) RebuildMutableState(
	ctx context.Context,
	request *adminservice.RebuildMutableStateRequest,
) (_ *adminservice.RebuildMutableStateResponse, retError error)

func (*AdminHandler) RefreshWorkflowTasks

RefreshWorkflowTasks re-generates the workflow tasks

func (*AdminHandler) RemoveRemoteCluster

func (adh *AdminHandler) RemoveRemoteCluster(
	ctx context.Context,
	request *adminservice.RemoveRemoteClusterRequest,
) (_ *adminservice.RemoveRemoteClusterResponse, retError error)

RemoveRemoteCluster TODO: Remove this API after migrate tctl to use operator handler

func (*AdminHandler) RemoveSearchAttributes

func (adh *AdminHandler) RemoveSearchAttributes(
	ctx context.Context,
	request *adminservice.RemoveSearchAttributesRequest,
) (_ *adminservice.RemoveSearchAttributesResponse, retError error)

RemoveSearchAttributes remove search attribute from the cluster.

func (*AdminHandler) RemoveTask

func (adh *AdminHandler) RemoveTask(ctx context.Context, request *adminservice.RemoveTaskRequest) (_ *adminservice.RemoveTaskResponse, retError error)

RemoveTask returns information about the internal states of a history host

func (*AdminHandler) ResendReplicationTasks

ResendReplicationTasks requests replication task from remote cluster

func (*AdminHandler) Start

func (adh *AdminHandler) Start()

Start starts the handler

func (*AdminHandler) StartAdminBatchOperation

func (adh *AdminHandler) StartAdminBatchOperation(
	ctx context.Context,
	request *adminservice.StartAdminBatchOperationRequest,
) (_ *adminservice.StartAdminBatchOperationResponse, retError error)

StartAdminBatchOperation starts an admin batch operation.

func (*AdminHandler) Stop

func (adh *AdminHandler) Stop()

Stop stops the handler

func (*AdminHandler) StreamWorkflowReplicationMessages

func (adh *AdminHandler) StreamWorkflowReplicationMessages(
	clientCluster adminservice.AdminService_StreamWorkflowReplicationMessagesServer,
) (retError error)

func (*AdminHandler) SyncWorkflowState

type Config

type Config struct {
	NumHistoryShards                     int32
	PersistenceMaxQPS                    dynamicconfig.IntPropertyFn
	PersistenceGlobalMaxQPS              dynamicconfig.IntPropertyFn
	PersistenceNamespaceMaxQPS           dynamicconfig.IntPropertyFnWithNamespaceFilter
	PersistenceGlobalNamespaceMaxQPS     dynamicconfig.IntPropertyFnWithNamespaceFilter
	PersistencePerShardNamespaceMaxQPS   dynamicconfig.IntPropertyFnWithNamespaceFilter
	PersistenceDynamicRateLimitingParams dynamicconfig.TypedPropertyFn[dynamicconfig.DynamicRateLimitingParams]
	PersistenceQPSBurstRatio             dynamicconfig.FloatPropertyFn

	VisibilityPersistenceMaxReadQPS         dynamicconfig.IntPropertyFn
	VisibilityPersistenceMaxWriteQPS        dynamicconfig.IntPropertyFn
	VisibilityPersistenceSlowQueryThreshold dynamicconfig.DurationPropertyFn
	VisibilityMaxPageSize                   dynamicconfig.IntPropertyFnWithNamespaceFilter
	EnableReadFromSecondaryVisibility       dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityEnableShadowReadMode          dynamicconfig.BoolPropertyFn
	VisibilityDisableOrderByClause          dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityEnableManualPagination        dynamicconfig.BoolPropertyFnWithNamespaceFilter
	VisibilityEnableUnifiedQueryConverter   dynamicconfig.BoolPropertyFn
	VisibilityAllowList                     dynamicconfig.BoolPropertyFnWithNamespaceFilter
	SuppressErrorSetSystemSearchAttribute   dynamicconfig.BoolPropertyFnWithNamespaceFilter

	HistoryMaxPageSize dynamicconfig.IntPropertyFnWithNamespaceFilter
	RPS                dynamicconfig.IntPropertyFn
	GlobalRPS          dynamicconfig.IntPropertyFn
	OperatorRPSRatio   dynamicconfig.FloatPropertyFn

	NamespaceReplicationInducingAPIsRPS                               dynamicconfig.IntPropertyFn
	MaxNamespaceRPSPerInstance                                        dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxNamespaceBurstRatioPerInstance                                 dynamicconfig.FloatPropertyFnWithNamespaceFilter
	MaxConcurrentLongRunningRequestsPerInstance                       dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxGlobalConcurrentLongRunningRequests                            dynamicconfig.IntPropertyFnWithNamespaceFilter
	PollWaitForNamespaceRateLimitToken                                dynamicconfig.BoolPropertyFnWithNamespaceFilter
	MaxNamespaceVisibilityRPSPerInstance                              dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxNamespaceVisibilityBurstRatioPerInstance                       dynamicconfig.FloatPropertyFnWithNamespaceFilter
	MaxNamespaceNamespaceReplicationInducingAPIsRPSPerInstance        dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxNamespaceNamespaceReplicationInducingAPIsBurstRatioPerInstance dynamicconfig.FloatPropertyFnWithNamespaceFilter
	GlobalWorkerDeploymentReadRPS                                     dynamicconfig.IntPropertyFnWithNamespaceFilter
	GlobalWorkerDeploymentReadBurstRatio                              dynamicconfig.FloatPropertyFnWithNamespaceFilter
	GlobalNamespaceRPS                                                dynamicconfig.IntPropertyFnWithNamespaceFilter
	InternalFEGlobalNamespaceRPS                                      dynamicconfig.IntPropertyFnWithNamespaceFilter
	GlobalNamespaceVisibilityRPS                                      dynamicconfig.IntPropertyFnWithNamespaceFilter
	InternalFEGlobalNamespaceVisibilityRPS                            dynamicconfig.IntPropertyFnWithNamespaceFilter
	GlobalNamespaceNamespaceReplicationInducingAPIsRPS                dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxIDLengthLimit                                                  dynamicconfig.IntPropertyFn
	WorkerBuildIdSizeLimit                                            dynamicconfig.IntPropertyFn
	ReachabilityTaskQueueScanLimit                                    dynamicconfig.IntPropertyFn
	ReachabilityQueryBuildIdLimit                                     dynamicconfig.IntPropertyFn
	ReachabilityCacheOpenWFsTTL                                       dynamicconfig.DurationPropertyFn
	ReachabilityCacheClosedWFsTTL                                     dynamicconfig.DurationPropertyFn
	ReachabilityQuerySetDurationSinceDefault                          dynamicconfig.DurationPropertyFn
	DisallowQuery                                                     dynamicconfig.BoolPropertyFnWithNamespaceFilter
	ShutdownDrainDuration                                             dynamicconfig.DurationPropertyFn
	ShutdownFailHealthCheckDuration                                   dynamicconfig.DurationPropertyFn

	MaxFairnessWeightOverrideConfigLimit dynamicconfig.IntPropertyFnWithTaskQueueFilter

	MaxBadBinaries dynamicconfig.IntPropertyFnWithNamespaceFilter

	// security protection settings
	DisableListVisibilityByFilter dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// size limit system protection
	BlobSizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter
	BlobSizeLimitWarn  dynamicconfig.IntPropertyFnWithNamespaceFilter
	MemoSizeLimitError dynamicconfig.IntPropertyFnWithNamespaceFilter

	ThrottledLogRPS dynamicconfig.IntPropertyFn

	// Namespace specific config
	EnableNamespaceNotActiveAutoForwarding  dynamicconfig.BoolPropertyFnWithNamespaceFilter
	ForceNamespaceSelectedAPIAutoForwarding dynamicconfig.BoolPropertyFnWithNamespaceFilter
	NamespaceMinRetentionLocal              dynamicconfig.DurationPropertyFn
	NamespaceMinRetentionGlobal             dynamicconfig.DurationPropertyFn

	SearchAttributesNumberOfKeysLimit dynamicconfig.IntPropertyFnWithNamespaceFilter
	SearchAttributesSizeOfValueLimit  dynamicconfig.IntPropertyFnWithNamespaceFilter
	SearchAttributesTotalSizeLimit    dynamicconfig.IntPropertyFnWithNamespaceFilter

	// DefaultWorkflowRetryPolicy represents default values for unset fields on a Workflow's
	// specified RetryPolicy
	DefaultWorkflowRetryPolicy dynamicconfig.TypedPropertyFnWithNamespaceFilter[retrypolicy.DefaultRetrySettings]

	// VisibilityArchival system protection
	VisibilityArchivalQueryMaxPageSize dynamicconfig.IntPropertyFn

	// DEPRECATED
	SendRawWorkflowHistory dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// DefaultWorkflowTaskTimeout the default workflow task timeout
	DefaultWorkflowTaskTimeout dynamicconfig.DurationPropertyFnWithNamespaceFilter

	// EnableServerVersionCheck disables periodic version checking performed by the frontend
	EnableServerVersionCheck dynamicconfig.BoolPropertyFn

	// EnableTokenNamespaceEnforcement enables enforcement that namespace in completion token matches namespace of the request
	EnableTokenNamespaceEnforcement dynamicconfig.BoolPropertyFn

	// ExposeAuthorizerErrors controls whether errors returned by the Authorizer will be wrapped with a PermissionDenied error.
	ExposeAuthorizerErrors dynamicconfig.BoolPropertyFn

	// gRPC keep alive options
	// If a client pings too frequently, terminate the connection.
	KeepAliveMinTime dynamicconfig.DurationPropertyFn
	//  Allow pings even when there are no active streams (RPCs)
	KeepAlivePermitWithoutStream dynamicconfig.BoolPropertyFn
	// Close the connection if a client is idle.
	KeepAliveMaxConnectionIdle dynamicconfig.DurationPropertyFn
	// Close the connection if it is too old.
	KeepAliveMaxConnectionAge dynamicconfig.DurationPropertyFn
	// Additive period after MaxConnectionAge after which the connection will be forcibly closed.
	KeepAliveMaxConnectionAgeGrace dynamicconfig.DurationPropertyFn
	// Ping the client if it is idle to ensure the connection is still active.
	KeepAliveTime dynamicconfig.DurationPropertyFn
	// Wait for the ping ack before assuming the connection is dead.
	KeepAliveTimeout dynamicconfig.DurationPropertyFn

	// RPS per every parallel delete executions activity.
	// Total RPS is equal to DeleteNamespaceDeleteActivityRPS * DeleteNamespaceConcurrentDeleteExecutionsActivities.
	// Default value is 100.
	DeleteNamespaceDeleteActivityRPS dynamicconfig.IntPropertyFn
	// Page size to read executions from visibility for delete executions activity.
	// Default value is 1000.
	DeleteNamespacePageSize dynamicconfig.IntPropertyFn
	// Number of pages before returning ContinueAsNew from delete executions activity.
	// Default value is 256.
	DeleteNamespacePagesPerExecution dynamicconfig.IntPropertyFn
	// Number of concurrent delete executions activities.
	// Must be not greater than 256 and number of worker cores in the cluster.
	// Default is 4.
	DeleteNamespaceConcurrentDeleteExecutionsActivities dynamicconfig.IntPropertyFn
	// Duration for how long namespace stays in database
	// after all namespace resources (i.e. workflow executions) are deleted.
	// Default is 0, means, namespace will be deleted immediately.
	DeleteNamespaceNamespaceDeleteDelay dynamicconfig.DurationPropertyFn

	// Enable schedule-related RPCs
	EnableSchedules dynamicconfig.BoolPropertyFnWithNamespaceFilter
	// Reject schedules whose interval/phase durations are malformed protobufs. When
	// disabled, such schedules are logged and allowed through.
	EnforceScheduleDurationValidation dynamicconfig.BoolPropertyFn

	// Enable CHASM tree infrastructure
	EnableChasm dynamicconfig.BoolPropertyFnWithNamespaceFilter
	// Enable creation of new schedules on CHASM (V2) engine
	EnableCHASMSchedulerCreation dynamicconfig.BoolPropertyFnWithNamespaceFilter
	// Per-namespace percentage [0-100] of new schedules routed to CHASM when
	// EnableCHASMSchedulerCreation is true. Default 0.
	CHASMSchedulerCreationRolloutPercent dynamicconfig.IntPropertyFnWithNamespaceFilter
	// Enable CHASM-first routing for schedule RPCs other than CreateSchedule
	EnableCHASMSchedulerRouting dynamicconfig.BoolPropertyFnWithNamespaceFilter
	// Enables ID-space collision sentinels, and must be enabled and propagated in
	// advance of EnableCHASMSchedulerCreation.
	EnableCHASMSchedulerSentinels dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// Enable deployment RPCs
	EnableDeployments dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// Enable deployment version RPCs
	EnableDeploymentVersions dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// Enable batcher RPCs
	EnableBatcher dynamicconfig.BoolPropertyFnWithNamespaceFilter
	// Batch operation dynamic configs
	MaxConcurrentBatchOperation     dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxExecutionCountBatchOperation dynamicconfig.IntPropertyFnWithNamespaceFilter
	// Admin Batch operation dynamic config
	MaxConcurrentAdminBatchOperation             dynamicconfig.IntPropertyFnWithNamespaceFilter
	EnableBatchOperationsForStandaloneActivities dynamicconfig.BoolPropertyFnWithNamespaceFilter

	EnableUpdateWorkflowExecution                              dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableUpdateWorkflowExecutionAsyncAccepted                 dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableWorkflowUpdateCallbacks                              dynamicconfig.BoolPropertyFnWithNamespaceFilter
	NumConsecutiveWorkflowTaskProblemsToTriggerSearchAttribute dynamicconfig.IntPropertyFnWithNamespaceFilter

	EnableWorkerVersioningData     dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableWorkerVersioningWorkflow dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableWorkerVersioningRules    dynamicconfig.BoolPropertyFnWithNamespaceFilter

	CallbackURLMaxLength    dynamicconfig.IntPropertyFnWithNamespaceFilter
	CallbackHeaderMaxSize   dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxCallbacksPerWorkflow dynamicconfig.IntPropertyFnWithNamespaceFilter
	CallbackEndpointConfigs dynamicconfig.TypedPropertyFnWithNamespaceFilter[callback.AddressMatchRules]

	MaxNexusOperationTokenLength   dynamicconfig.IntPropertyFnWithNamespaceFilter
	NexusRequestHeadersBlacklist   dynamicconfig.TypedPropertyFn[*regexp.Regexp]
	NexusForwardRequestUseEndpoint dynamicconfig.BoolPropertyFn
	NexusOperationsMetricTagConfig dynamicconfig.TypedPropertyFn[chasmnexus.NexusMetricTagConfig]

	LinkMaxSize        dynamicconfig.IntPropertyFnWithNamespaceFilter
	MaxLinksPerRequest dynamicconfig.IntPropertyFnWithNamespaceFilter

	AdminEnableListHistoryTasks dynamicconfig.BoolPropertyFn

	MaskInternalErrorDetails dynamicconfig.BoolPropertyFnWithNamespaceFilter

	// Health check
	HistoryHostErrorPercentage     dynamicconfig.FloatPropertyFn
	HistoryHostSelfErrorProportion dynamicconfig.FloatPropertyFn

	LogAllReqErrors dynamicconfig.BoolPropertyFnWithNamespaceFilter

	EnableEagerWorkflowStart dynamicconfig.BoolPropertyFnWithNamespaceFilter

	WorkflowRulesAPIsEnabled     dynamicconfig.BoolPropertyFnWithNamespaceFilter
	MaxWorkflowRulesPerNamespace dynamicconfig.IntPropertyFnWithNamespaceFilter

	WorkerHeartbeatsEnabled                 dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableCancelWorkerPollsOnShutdown       dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableMatchingFanOutForPollCancellation dynamicconfig.BoolPropertyFnWithNamespaceFilter
	NumTaskQueueReadPartitions              dynamicconfig.IntPropertyFnWithTaskQueueFilter
	WorkerCommandsEnabled                   dynamicconfig.BoolPropertyFnWithNamespaceFilter
	PollerAutoscalingAutoEnroll             dynamicconfig.BoolPropertyFnWithNamespaceFilter
	WorkflowPauseEnabled                    dynamicconfig.BoolPropertyFnWithNamespaceFilter
	WorkflowTimeSkippingEnabled             dynamicconfig.BoolPropertyFnWithNamespaceFilter
	WorkflowTimeSkippingMaxSkipPerSession   dynamicconfig.IntPropertyFnWithNamespaceFilter
	StandaloneNexusOperationsEnabled        dynamicconfig.BoolPropertyFnWithNamespaceFilter
	EnableWorkflowTaskCompletionPagination  dynamicconfig.BoolPropertyFnWithNamespaceFilter
	WorkflowTaskCompletionBufferSizeLimit   dynamicconfig.IntPropertyFnWithNamespaceFilter

	HTTPAllowedHosts   dynamicconfig.TypedPropertyFn[*regexp.Regexp]
	AllowedExperiments dynamicconfig.TypedPropertyFnWithNamespaceFilter[[]string]

	// CHASM archetypes
	Activity *activity.Config
}

Config represents configuration for frontend service

func ConfigProvider

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

func NewConfig

func NewConfig(
	dc *dynamicconfig.Collection,
	numHistoryShards int32,
) *Config

NewConfig returns new service config with default values

func (*Config) IsExperimentAllowed

func (c *Config) IsExperimentAllowed(experiment string, namespace string) bool

IsExperimentAllowed checks if an experiment is enabled for a given namespace in the dynamic config. Returns true if the experiment is explicitly listed or if "*" (wildcard) is present in the allowed experiments list.

type FEReplicatorNamespaceReplicationQueue

type FEReplicatorNamespaceReplicationQueue persistence.NamespaceReplicationQueue

func FEReplicatorNamespaceReplicationQueueProvider

func FEReplicatorNamespaceReplicationQueueProvider(
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	clusterMetadata cluster.Metadata,
) FEReplicatorNamespaceReplicationQueue

type GrpcServerOptions

type GrpcServerOptions struct {
	Options           []grpc.ServerOption
	UnaryInterceptors []grpc.UnaryServerInterceptor
}

GrpcServerOptions are the options to build the frontend gRPC server along with the interceptors that are already set in the options.

func GrpcServerOptionsProvider

func GrpcServerOptionsProvider(
	logger log.Logger,
	cfg *config.Config,
	serviceConfig *Config,
	serviceName primitives.ServiceName,
	rpcFactory common.RPCFactory,
	serviceErrorInterceptor *interceptor.ServiceErrorInterceptor,
	namespaceLogInterceptor *interceptor.NamespaceLogInterceptor,
	namespaceRateLimiterInterceptor interceptor.NamespaceRateLimitInterceptor,
	namespaceCountLimiterInterceptor *interceptor.ConcurrentRequestLimitInterceptor,
	namespaceValidatorInterceptor *interceptor.NamespaceValidatorInterceptor,
	namespaceHandoverInterceptor *interceptor.NamespaceHandoverInterceptor,
	businessIDInterceptor *interceptor.RoutingKeyInterceptor,
	redirectionInterceptor *interceptor.Redirection,
	telemetryInterceptor *interceptor.TelemetryInterceptor,
	retryableInterceptor *interceptor.RetryableInterceptor,
	healthInterceptor *interceptor.HealthInterceptor,
	rateLimitInterceptor *interceptor.RateLimitInterceptor,
	traceStatsHandler telemetry.ServerStatsHandler,
	metricsStatsHandler metrics.ServerStatsHandler,
	sdkVersionInterceptor *interceptor.SDKVersionInterceptor,
	callerInfoInterceptor *interceptor.CallerInfoInterceptor,
	authInterceptor *authorization.Interceptor,
	maskInternalErrorDetailsInterceptor *interceptor.MaskInternalErrorDetailsInterceptor,
	contextMetadataInterceptor *interceptor.ContextMetadataInterceptor,
	slowRequestLoggerInterceptor *interceptor.SlowRequestLoggerInterceptor,
	chasmRequestVisibilityInterceptor *chasm.ChasmVisibilityInterceptor,
	customInterceptors []grpc.UnaryServerInterceptor,
	customStreamInterceptors []grpc.StreamServerInterceptor,
	metricsHandler metrics.Handler,
) GrpcServerOptions

type HTTPAPIServer

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

HTTPAPIServer is an HTTP API server that forwards requests to gRPC via the gRPC interceptors.

func HTTPAPIServerProvider

func HTTPAPIServerProvider(
	cfg *config.Config,
	serviceName primitives.ServiceName,
	serviceConfig *Config,
	grpcListener net.Listener,
	tlsConfigProvider encryption.TLSConfigProvider,
	handler Handler,
	operatorHandler *OperatorHandlerImpl,
	grpcServerOptions GrpcServerOptions,
	metricsHandler metrics.Handler,
	namespaceRegistry namespace.Registry,
	logger log.Logger,
	router *mux.Router,
) (*HTTPAPIServer, error)

HTTPAPIServerProvider provides an HTTP API server if enabled or nil otherwise.

func NewHTTPAPIServer

func NewHTTPAPIServer(
	serviceConfig *Config,
	rpcConfig config.RPC,
	grpcListener net.Listener,
	tlsConfigProvider encryption.TLSConfigProvider,
	handler Handler,
	operatorHandler *OperatorHandlerImpl,
	interceptors []grpc.UnaryServerInterceptor,
	metricsHandler metrics.Handler,
	router *mux.Router,
	namespaceRegistry namespace.Registry,
	logger log.Logger,
) (*HTTPAPIServer, error)

NewHTTPAPIServer creates an HTTPAPIServer.

routes registered with additionalRouteRegistrationFuncs take precedence over the auto generated grpc proxy routes.

func (*HTTPAPIServer) GracefulStop

func (h *HTTPAPIServer) GracefulStop(gracefulDrainTime time.Duration)

GracefulStop stops the HTTP server. This will first attempt a graceful stop with a drain time, then will hard-stop. This will not return until stopped.

func (*HTTPAPIServer) Serve

func (h *HTTPAPIServer) Serve() error

Serve serves the HTTP API and does not return until there is a serve error or GracefulStop completes. Upon graceful stop, this will return nil. If an error is returned, the message is clear that it came from the HTTP API server.

type Handler

type Handler interface {
	workflowservice.WorkflowServiceServer
	GetConfig() *Config
	Start()
	Stop()
}

Handler is interface wrapping frontend workflow handler

func HandlerProvider

func HandlerProvider(
	dc *dynamicconfig.Collection,
	cfg *config.Config,
	serviceName primitives.ServiceName,
	dcRedirectionPolicy config.DCRedirectionPolicy,
	serviceConfig *Config,
	versionChecker *VersionChecker,
	namespaceReplicationQueue FEReplicatorNamespaceReplicationQueue,
	visibilityMgr manager.VisibilityManager,
	chasmVisibilityMgr chasm.VisibilityManager,
	logger log.SnTaggedLogger,
	throttledLogger log.ThrottledLogger,
	persistenceExecutionManager persistence.ExecutionManager,
	clusterMetadataManager persistence.ClusterMetadataManager,
	persistenceMetadataManager persistence.MetadataManager,
	clientBean client.Bean,
	historyClient resource.HistoryClient,
	matchingClient resource.MatchingClient,
	workerDeploymentStoreClient workerdeployment.Client,
	schedulerClient schedulerpb.SchedulerServiceClient,
	archiverProvider provider.ArchiverProvider,
	metricsHandler metrics.Handler,
	payloadSerializer serialization.Serializer,
	timeSource clock.TimeSource,
	namespaceRegistry namespace.Registry,
	saMapperProvider searchattribute.MapperProvider,
	saProvider searchattribute.Provider,
	saValidator *searchattribute.Validator,
	clusterMetadata cluster.Metadata,
	archivalMetadata archiver.ArchivalMetadata,
	healthServer *health.Server,
	membershipMonitor membership.Monitor,
	healthInterceptor *interceptor.HealthInterceptor,
	scheduleSpecBuilder *scheduler.SpecBuilder,
	activityHandler activity.FrontendHandler,
	callbackValidator callback.Validator,
	nexusOperationHandler chasmnexus.FrontendHandler,
	registry *chasm.Registry,
	frontendServiceResolver membership.ServiceResolver,
) Handler

type HealthCheckResult

type HealthCheckResult struct {
	State         enumsspb.HealthState
	ServiceDetail *healthspb.ServiceHealthDetail
}

type HealthChecker

type HealthChecker interface {
	Check(ctx context.Context) (HealthCheckResult, error)
}

func NewHealthChecker

func NewHealthChecker(
	serviceName primitives.ServiceName,
	membershipMonitor membership.Monitor,
	hostFailurePercentage dynamicconfig.FloatPropertyFn,
	hostDeclinedServingProportion dynamicconfig.FloatPropertyFn,
	healthCheckFn func(ctx context.Context, hostAddress string) (*historyservice.DeepHealthCheckResponse, error),
	logger log.Logger,
) HealthChecker

type NamespaceHandoverInterceptorParams

type NamespaceHandoverInterceptorParams struct {
	fx.In
	DynamicConfig                          *dynamicconfig.Collection
	NamespaceRegistry                      namespace.Registry
	Logger                                 log.Logger
	MetricsHandler                         metrics.Handler
	TimeSource                             clock.TimeSource
	RequestErrorHandler                    *interceptor.RequestErrorHandler
	AdditionalAllowedMethodsDuringHandover []string `group:"additionalAllowedMethodsDuringHandover"`
}

type NamespaceRateLimiters

type NamespaceRateLimiters struct {
	Execution                    quotas.RequestRateLimiter
	Visibility                   quotas.RequestRateLimiter
	NamespaceReplicationInducing quotas.RequestRateLimiter
}

NamespaceRateLimiters holds the three per-category namespace rate limiters that NamespaceRateLimitInterceptorProvider combines into a single routing rate limiter.

func NamespaceRateLimitersProvider

func NamespaceRateLimitersProvider(
	serviceName primitives.ServiceName,
	serviceConfig *Config,
	frontendServiceResolver membership.ServiceResolver,
	logger log.SnTaggedLogger,
) NamespaceRateLimiters

type NamespaceValidatorInterceptorParams

type NamespaceValidatorInterceptorParams struct {
	fx.In
	ServiceConfig                          *Config
	NamespaceRegistry                      namespace.Registry
	AdditionalAllowedMethodsDuringHandover []string `group:"additionalAllowedMethodsDuringHandover"`
}

type NewAdminHandlerArgs

type NewAdminHandlerArgs struct {
	PersistenceConfig                   *config.Persistence
	Config                              *Config
	NamespaceReplicationQueue           persistence.NamespaceReplicationQueue
	ReplicatorNamespaceReplicationQueue persistence.NamespaceReplicationQueue

	Logger                      log.Logger
	TaskManager                 persistence.TaskManager
	FairTaskManager             persistence.FairTaskManager
	PersistenceExecutionManager persistence.ExecutionManager
	ClusterMetadataManager      persistence.ClusterMetadataManager
	PersistenceMetadataManager  persistence.MetadataManager
	ClientFactory               serverClient.Factory
	HistoryClient               historyservice.HistoryServiceClient

	MembershipMonitor membership.Monitor
	HostInfoProvider  membership.HostInfoProvider
	NamespaceRegistry namespace.Registry
	SaMapperProvider  searchattribute.MapperProvider

	ClusterMetadata     cluster.Metadata
	HealthServer        *health.Server
	EventSerializer     serialization.Serializer
	TimeSource          clock.TimeSource
	ChasmRegistry       *chasm.Registry
	NamespaceDataMerger nsreplication.NamespaceDataMerger
	SchedulerClient     schedulerpb.SchedulerServiceClient

	// DEPRECATED: only history service on server side is supposed to
	// use the following components.
	CategoryRegistry tasks.TaskCategoryRegistry
	// contains filtered or unexported fields
}

type NewOperatorHandlerImplArgs

type NewOperatorHandlerImplArgs struct {
	Logger log.Logger

	MetricsHandler metrics.Handler
	VisibilityMgr  manager.VisibilityManager
	SaManager      searchattribute.Manager
	// contains filtered or unexported fields
}

type NexusEndpointClient

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

NexusEndpointClient manages frontend CRUD requests for Nexus endpoints. Create, Update, and Delete requests are forwarded to matching service which owns the endpoints table. Read (Get and List) requests are sent directly to persistence. This is to ensure read-after-write consistency.

func NexusEndpointClientProvider

func NexusEndpointClientProvider(
	dc *dynamicconfig.Collection,
	namespaceRegistry namespace.Registry,
	matchingClient resource.MatchingClient,
	nexusEndpointManager persistence.NexusEndpointManager,
	logger log.Logger,
) *NexusEndpointClient

type NexusOperationHTTPHandler

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

Small wrapper that does some pre-processing before handing requests over to the Nexus SDK's HTTP handler.

func NewNexusOperationHTTPHandler

func NewNexusOperationHTTPHandler(
	serviceConfig *Config,
	matchingClient resource.MatchingClient,
	metricsHandler metrics.Handler,
	clusterMetadata cluster.Metadata,
	clientCache *cluster.FrontendHTTPClientCache,
	namespaceRegistry namespace.Registry,
	endpointRegistry commonnexus.EndpointRegistry,
	authInterceptor *authorization.Interceptor,
	telemetryInterceptor *interceptor.TelemetryInterceptor,
	requestErrorHandler *interceptor.RequestErrorHandler,
	redirectionInterceptor *interceptor.Redirection,
	namespaceValidationInterceptor *interceptor.NamespaceValidatorInterceptor,
	namespaceRateLimitInterceptor interceptor.NamespaceRateLimitInterceptor,
	namespaceConcurrencyLimitInterceptor *interceptor.ConcurrentRequestLimitInterceptor,
	rateLimitInterceptor *interceptor.RateLimitInterceptor,
	logger log.Logger,
	httpTraceProvider commonnexus.HTTPClientTraceProvider,
) *NexusOperationHTTPHandler

func (*NexusOperationHTTPHandler) RegisterRoutes

func (h *NexusOperationHTTPHandler) RegisterRoutes(r *mux.Router)

type NexusOperationHandler

type NexusOperationHandler = chasmnexus.FrontendHandler

NexusOperationHandler is the nexus operation frontend handler, aliased to avoid embedding name collision.

type OpenAPIHTTPHandler

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

Small wrapper that does some pre-processing before handing requests over to the OpenAPI SDK's HTTP handler.

func NewOpenAPIHTTPHandler

func NewOpenAPIHTTPHandler(
	rateLimitInterceptor *interceptor.RateLimitInterceptor,
	logger log.Logger,
) *OpenAPIHTTPHandler

func RegisterOpenAPIHTTPHandler

func RegisterOpenAPIHTTPHandler(
	rateLimitInterceptor *interceptor.RateLimitInterceptor,
	logger log.Logger,
	router *mux.Router,
) *OpenAPIHTTPHandler

func (*OpenAPIHTTPHandler) RegisterRoutes

func (h *OpenAPIHTTPHandler) RegisterRoutes(r *mux.Router)

type OperatorHandler

type OperatorHandler interface {
	operatorservice.OperatorServiceServer
	Start()
	Stop()
}

OperatorHandler is interface wrapping frontend workflow handler

type OperatorHandlerImpl

type OperatorHandlerImpl struct {
	operatorservice.UnimplementedOperatorServiceServer
	// contains filtered or unexported fields
}

OperatorHandlerImpl - gRPC handler interface for operator service

func NewOperatorHandlerImpl

func NewOperatorHandlerImpl(
	args NewOperatorHandlerImplArgs,
) *OperatorHandlerImpl

NewOperatorHandlerImpl creates a gRPC handler for operatorservice

func OperatorHandlerProvider

func OperatorHandlerProvider(
	configuration *Config,
	logger log.SnTaggedLogger,
	sdkClientFactory sdk.ClientFactory,
	metricsHandler metrics.Handler,
	visibilityMgr manager.VisibilityManager,
	saManager searchattribute.Manager,
	healthServer *health.Server,
	historyClient resource.HistoryClient,
	clusterMetadataManager persistence.ClusterMetadataManager,
	clusterMetadata cluster.Metadata,
	clientFactory client.Factory,
	namespaceRegistry namespace.Registry,
	nexusEndpointClient *NexusEndpointClient,
) *OperatorHandlerImpl

func (*OperatorHandlerImpl) AddOrUpdateRemoteCluster

AddOrUpdateRemoteCluster adds or updates the connection config to a remote cluster.

func (*OperatorHandlerImpl) AddSearchAttributes

func (*OperatorHandlerImpl) CreateNexusEndpoint

func (*OperatorHandlerImpl) DeleteNamespace

func (*OperatorHandlerImpl) DeleteNexusEndpoint

func (*OperatorHandlerImpl) GetNexusEndpoint

func (*OperatorHandlerImpl) ListClusters

func (*OperatorHandlerImpl) ListNexusEndpoints

func (*OperatorHandlerImpl) ListSearchAttributes

func (*OperatorHandlerImpl) RemoveRemoteCluster

func (*OperatorHandlerImpl) RemoveSearchAttributes

func (*OperatorHandlerImpl) Start

func (h *OperatorHandlerImpl) Start()

Start starts the handler

func (*OperatorHandlerImpl) Stop

func (h *OperatorHandlerImpl) Stop()

Stop stops the handler

func (*OperatorHandlerImpl) UpdateNexusEndpoint

type Overrides

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

Overrides defines a set of special case behaviors like compensating for buggy SDK implementations

func NewOverrides

func NewOverrides() *Overrides

func (*Overrides) DisableEagerActivityDispatchForBuggyClients

func (o *Overrides) DisableEagerActivityDispatchForBuggyClients(
	ctx context.Context,
	request *workflowservice.RespondWorkflowTaskCompletedRequest,
)

DisableEagerActivityDispatchForBuggyClients compensates for SDK versions that have buggy implementations of eager activity dispatch

type Service

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

Service represents the frontend service

func NewService

func NewService(
	serviceConfig *Config,
	server *grpc.Server,
	healthServer *health.Server,
	httpAPIServer *HTTPAPIServer,
	handler Handler,
	adminHandler *AdminHandler,
	operatorHandler *OperatorHandlerImpl,
	versionChecker *VersionChecker,
	visibilityMgr manager.VisibilityManager,
	logger log.Logger,
	grpcListener net.Listener,
	metricsHandler metrics.Handler,
	membershipMonitor membership.Monitor,
) *Service

func NewServiceProvider

func NewServiceProvider(
	serviceConfig *Config,
	server *grpc.Server,
	healthServer *health.Server,
	httpAPIServer *HTTPAPIServer,
	handler Handler,
	adminHandler *AdminHandler,
	operatorHandler *OperatorHandlerImpl,
	versionChecker *VersionChecker,
	visibilityMgr manager.VisibilityManager,
	logger log.SnTaggedLogger,
	grpcListener net.Listener,
	metricsHandler metrics.Handler,
	membershipMonitor membership.Monitor,
) *Service

func (*Service) Start

func (s *Service) Start()

Start starts the service

func (*Service) Stop

func (s *Service) Stop()

Stop stops the service

type VersionChecker

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

func NewVersionChecker

func NewVersionChecker(
	config *Config,
	metricsHandler metrics.Handler,
	clusterMetadataManager persistence.ClusterMetadataManager,
	sdkVersionRecorder *interceptor.SDKVersionInterceptor,
) *VersionChecker

func (*VersionChecker) Start

func (vc *VersionChecker) Start()

func (*VersionChecker) Stop

func (vc *VersionChecker) Stop()

type WorkflowHandler

type WorkflowHandler struct {
	workflowservice.UnsafeWorkflowServiceServer
	ActivityHandler
	NexusOperationHandler
	// contains filtered or unexported fields
}

WorkflowHandler - gRPC handler interface for workflowservice

func NewWorkflowHandler

func NewWorkflowHandler(
	callbackValidator callback.Validator,
	config *Config,
	namespaceReplicationQueue persistence.NamespaceReplicationQueue,
	visibilityMgr manager.VisibilityManager,
	logger log.Logger,
	throttledLogger log.Logger,
	persistenceExecutionName string,
	clusterMetadataManager persistence.ClusterMetadataManager,
	persistenceMetadataManager persistence.MetadataManager,
	historyClient historyservice.HistoryServiceClient,
	matchingClient matchingservice.MatchingServiceClient,
	workerDeploymentClient workerdeployment.Client,
	schedulerClient schedulerpb.SchedulerServiceClient,
	archiverProvider provider.ArchiverProvider,
	payloadSerializer serialization.Serializer,
	namespaceRegistry namespace.Registry,
	saMapperProvider searchattribute.MapperProvider,
	saProvider searchattribute.Provider,
	saValidator *searchattribute.Validator,
	clusterMetadata cluster.Metadata,
	archivalMetadata archiver.ArchivalMetadata,
	healthServer *health.Server,
	timeSource clock.TimeSource,
	membershipMonitor membership.Monitor,
	healthInterceptor *interceptor.HealthInterceptor,
	scheduleSpecBuilder *scheduler.SpecBuilder,
	httpEnabled bool,
	activityHandler activity.FrontendHandler,
	nexusOperationHandler chasmnexus.FrontendHandler,
	registry *chasm.Registry,
	workerDeploymentReadRateLimiter quotas.RequestRateLimiter,
	validator *workflow.RequestValidator,
) *WorkflowHandler

NewWorkflowHandler creates a gRPC handler for workflowservice

func (*WorkflowHandler) CountSchedules

func (*WorkflowHandler) CountWorkers

func (*WorkflowHandler) CountWorkflowExecutions

CountWorkflowExecutions is a visibility API to count of workflow executions in a specific namespace.

func (*WorkflowHandler) CreateSchedule

func (*WorkflowHandler) CreateWorkerDeployment

func (*WorkflowHandler) CreateWorkflowRule

func (*WorkflowHandler) DeleteSchedule

Deletes a schedule, removing it from the system.

func (*WorkflowHandler) DeleteWorkerDeployment

func (*WorkflowHandler) DeleteWorkflowExecution

DeleteWorkflowExecution deletes a closed workflow execution asynchronously (workflow must be completed or terminated before). This method is EXPERIMENTAL and may be changed or removed in a later release.

func (*WorkflowHandler) DeleteWorkflowRule

func (*WorkflowHandler) DeprecateNamespace

DeprecateNamespace us used to update status of a registered namespace to DEPRECATED. Once the namespace is deprecated it cannot be used to start new workflow executions. Existing workflow executions will continue to run on deprecated namespaces. Deprecated.

func (*WorkflowHandler) DescribeBatchOperation

func (*WorkflowHandler) DescribeDeployment

[cleanup-wv-pre-release]

func (*WorkflowHandler) DescribeNamespace

DescribeNamespace returns the information and configuration for a registered namespace.

func (*WorkflowHandler) DescribeSchedule

Returns the schedule description and current state of an existing schedule.

func (*WorkflowHandler) DescribeTaskQueue

DescribeTaskQueue returns information about the target taskqueue, right now this API returns the pollers which polled this taskqueue in last few minutes.

func (*WorkflowHandler) DescribeWorker

func (*WorkflowHandler) DescribeWorkerDeploymentVersion

Versioning-3 Public-Preview API's

func (*WorkflowHandler) DescribeWorkflowExecution

DescribeWorkflowExecution returns information about the specified workflow execution.

func (*WorkflowHandler) DescribeWorkflowRule

func (*WorkflowHandler) ExecuteMultiOperation

func (*WorkflowHandler) GetClusterInfo

GetClusterInfo return information about Temporal deployment.

func (*WorkflowHandler) GetConfig

func (wh *WorkflowHandler) GetConfig() *Config

GetConfig return config

func (*WorkflowHandler) GetCurrentDeployment

[cleanup-wv-pre-release]

func (*WorkflowHandler) GetDeploymentReachability

[cleanup-wv-pre-release]

func (*WorkflowHandler) GetSearchAttributes

GetSearchAttributes is a visibility API to get all legal keys that could be used in list APIs

func (*WorkflowHandler) GetSystemInfo

GetSystemInfo returns information about the Temporal system.

func (*WorkflowHandler) GetWorkflowExecutionHistory

GetWorkflowExecutionHistory returns the history of specified workflow execution. It fails with 'EntityNotExistError' if specified workflow execution in unknown to the service.

func (*WorkflowHandler) GetWorkflowExecutionHistoryReverse

GetWorkflowExecutionHistory returns the history of specified workflow execution. It fails with 'EntityNotExistError' if specified workflow execution in unknown to the service.

func (*WorkflowHandler) ListArchivedWorkflowExecutions

ListArchivedWorkflowExecutions is a visibility API to list archived workflow executions in a specific namespace.

func (*WorkflowHandler) ListBatchOperations

func (*WorkflowHandler) ListClosedWorkflowExecutions

ListClosedWorkflowExecutions is a visibility API to list the closed executions in a specific namespace.

func (*WorkflowHandler) ListDeployments

[cleanup-wv-pre-release]

func (*WorkflowHandler) ListNamespaces

ListNamespaces returns the information and configuration for all namespaces.

func (*WorkflowHandler) ListOpenWorkflowExecutions

ListOpenWorkflowExecutions is a visibility API to list the open executions in a specific namespace.

func (*WorkflowHandler) ListScheduleMatchingTimes

Lists matching times within a range.

func (*WorkflowHandler) ListSchedules

List all schedules in a namespace.

func (*WorkflowHandler) ListTaskQueuePartitions

ListTaskQueuePartitions returns all the partition and host for a task queue.

func (*WorkflowHandler) ListWorkerDeployments

func (*WorkflowHandler) ListWorkers

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

func (*WorkflowHandler) ListWorkflowExecutions

ListWorkflowExecutions is a visibility API to list workflow executions in a specific namespace.

func (*WorkflowHandler) ListWorkflowRules

func (*WorkflowHandler) PatchSchedule

Makes a specific change to a schedule or triggers an immediate action.

func (*WorkflowHandler) PauseActivity

func (*WorkflowHandler) PauseWorkflowExecution

PauseWorkflowExecution pauses a workflow execution.

func (*WorkflowHandler) PollActivityTaskQueue

PollActivityTaskQueue is called by application worker to process ActivityTask from a specific task queue. ActivityTask is dispatched to callers whenever a ScheduleTask command is made for a workflow execution. Application is expected to call 'RespondActivityTaskCompleted' or 'RespondActivityTaskFailed' once it is done processing the task. Application also needs to call 'RecordActivityTaskHeartbeat' API within 'heartbeatTimeoutSeconds' interval to prevent the task from getting timed out. An event 'ActivityTaskStarted' event is also written to workflow execution history before the ActivityTask is dispatched to application worker.

func (*WorkflowHandler) PollNexusTaskQueue

func (*WorkflowHandler) PollWorkflowTaskQueue

PollWorkflowTaskQueue is called by application worker to process WorkflowTask from a specific task queue. A WorkflowTask is dispatched to callers for active workflow executions, with pending workflow tasks. Application is then expected to call 'RespondWorkflowTaskCompleted' API when it is done processing the WorkflowTask. It will also create a 'WorkflowTaskStarted' event in the history for that session before handing off WorkflowTask to application worker.

func (*WorkflowHandler) QueryWorkflow

QueryWorkflow returns query result for a specified workflow execution

func (*WorkflowHandler) RecordActivityTaskHeartbeat

RecordActivityTaskHeartbeat is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeat' will fail with 'EntityNotExistsError' in such situations. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for heartbeating.

func (*WorkflowHandler) RecordActivityTaskHeartbeatById

RecordActivityTaskHeartbeatById is called by application worker while it is processing an ActivityTask. If worker fails to heartbeat within 'heartbeatTimeoutSeconds' interval for the ActivityTask, then it will be marked as timedout and 'ActivityTaskTimedOut' event will be written to the workflow history. Calling 'RecordActivityTaskHeartbeatById' will fail with 'EntityNotExistsError' in such situations. Instead of using 'taskToken' like in RecordActivityTaskHeartbeat, use Namespace, WorkflowID and ActivityID

func (*WorkflowHandler) RecordWorkerHeartbeat

RecordWorkerHeartbeat receive heartbeat request from the worker and forwards it to the corresponding matching service.

func (*WorkflowHandler) RegisterNamespace

RegisterNamespace creates a new namespace which can be used as a container for all resources. Namespace is a top level entity within Temporal, used as a container for all resources like workflow executions, task queues, etc. Namespace acts as a sandbox and provides isolation for all resources within the namespace. All resources belong to exactly one namespace.

func (*WorkflowHandler) RequestCancelWorkflowExecution

RequestCancelWorkflowExecution is called by application worker when it wants to request cancellation of a workflow instance. It will result in a new 'WorkflowExecutionCancelRequested' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. It returns success if requested workflow already closed. It fails with 'NotFound' if the requested workflow doesn't exist.

func (*WorkflowHandler) ResetActivity

func (*WorkflowHandler) ResetStickyTaskQueue

ResetStickyTaskQueue resets the sticky taskqueue related information in mutable state of a given workflow. Things cleared are: 1. StickyTaskQueue 2. StickyScheduleToStartTimeout

func (*WorkflowHandler) ResetWorkflowExecution

ResetWorkflowExecution reset an existing workflow execution to WorkflowTaskCompleted event(exclusive). And it will immediately terminating the current execution instance.

func (*WorkflowHandler) RespondActivityTaskCanceled

RespondActivityTaskCanceled is called by application worker when it is successfully canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskCanceledById

RespondActivityTaskCanceledById is called by application worker when it is successfully canceled an ActivityTask. It will result in a new 'ActivityTaskCanceled' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Similar to RespondActivityTaskCanceled but use Namespace, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskCompleted

RespondActivityTaskCompleted is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new WorkflowTask created for the workflow so new commands could be made. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for completion. It fails with 'NotFoundFailure' if the taskToken is not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskCompletedById

RespondActivityTaskCompletedById is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskCompleted' event being written to the workflow history and a new WorkflowTask created for the workflow so new commands could be made. Similar to RespondActivityTaskCompleted but use Namespace, WorkflowId and ActivityId instead of 'taskToken' for completion. It fails with 'NotFoundFailure' if the these Ids are not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskFailed

RespondActivityTaskFailed is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Use the 'taskToken' provided as response of PollActivityTaskQueue API call for completion. It fails with 'EntityNotExistsError' if the taskToken is not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondActivityTaskFailedById

RespondActivityTaskFailedById is called by application worker when it is done processing an ActivityTask. It will result in a new 'ActivityTaskFailed' event being written to the workflow history and a new WorkflowTask created for the workflow instance so new commands could be made. Similar to RespondActivityTaskFailed but use Namespace, WorkflowID and ActivityID instead of 'taskToken' for completion. It fails with 'EntityNotExistsError' if the these IDs are not valid anymore due to activity timeout.

func (*WorkflowHandler) RespondNexusTaskFailed

func (*WorkflowHandler) RespondQueryTaskCompleted

RespondQueryTaskCompleted is called by application worker to complete a QueryTask (which is a WorkflowTask for query) as a result of 'PollWorkflowTaskQueue' API call. Completing a QueryTask will unblock the client call to 'QueryWorkflow' API and return the query result to client as a response to 'QueryWorkflow' API call.

func (*WorkflowHandler) RespondWorkflowTaskCompleted

RespondWorkflowTaskCompleted is called by application worker to complete a WorkflowTask handed as a result of 'PollWorkflowTaskQueue' API call. Completing a WorkflowTask will result in new events for the workflow execution and potentially new ActivityTask being created for corresponding commands. It will also create a WorkflowTaskCompleted event in the history for that session. Use the 'taskToken' provided as response of PollWorkflowTaskQueue API call for completing the WorkflowTask. The response could contain a new workflow task if there is one or if the request asking for one.

func (*WorkflowHandler) RespondWorkflowTaskFailed

RespondWorkflowTaskFailed is called by application worker to indicate failure. This results in WorkflowTaskFailedEvent written to the history and a new WorkflowTask created. This API can be used by client to either clear sticky taskqueue or report any panics during WorkflowTask processing. Temporal will only append first WorkflowTaskFailed event to the history of workflow execution for consecutive failures.

func (*WorkflowHandler) ScanWorkflowExecutions

ScanWorkflowExecutions _was_ a Visibility API to list large amount of workflow executions in a specific namespace without order. It has since been deprecated in favor of `ListWorkflowExecutions` and rewritten to use `ListWorkflowExecutions` internally. Deprecated: Use `ListWorkflowExecutions`

func (*WorkflowHandler) SetCurrentDeployment

[cleanup-wv-pre-release]

func (*WorkflowHandler) ShutdownWorker

func (*WorkflowHandler) SignalWithStartWorkflowExecution

SignalWithStartWorkflowExecution is used to ensure sending signal to a workflow. If the workflow is running, this results in WorkflowExecutionSignaled event being recorded in the history and a workflow task being created for the execution. If the workflow is not running or not found, this results in WorkflowExecutionStarted and WorkflowExecutionSignaled events being recorded in history, and a workflow task being created for the execution

func (*WorkflowHandler) SignalWorkflowExecution

SignalWorkflowExecution is used to send a signal event to running workflow execution. This results in a WorkflowExecutionSignaled event recorded in the history and a workflow task being created for the execution.

func (*WorkflowHandler) Start

func (wh *WorkflowHandler) Start()

Start starts the handler

func (*WorkflowHandler) StartBatchOperation

func (*WorkflowHandler) StartWorkflowExecution

StartWorkflowExecution starts a new workflow instance (a "workflow execution"). It will create the instance with 'WorkflowExecutionStarted' event in history and also schedule the first WorkflowTask for the worker to make the first workflow task for this instance. It will return 'WorkflowExecutionAlreadyStartedError', if an instance already exists with same workflowId.

func (*WorkflowHandler) Stop

func (wh *WorkflowHandler) Stop()

Stop stops the handler

func (*WorkflowHandler) StopBatchOperation

func (*WorkflowHandler) TerminateWorkflowExecution

TerminateWorkflowExecution terminates an existing workflow execution by recording WorkflowExecutionTerminated event in the history and immediately terminating the execution instance.

func (*WorkflowHandler) UnpauseActivity

func (*WorkflowHandler) UpdateActivityOptions

func (*WorkflowHandler) UpdateNamespace

UpdateNamespace is used to update the information and configuration for a registered namespace.

func (*WorkflowHandler) UpdateSchedule

Changes the configuration or state of an existing schedule.

func (*WorkflowHandler) UpdateWorkflowExecution

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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