Documentation ¶
Index ¶
- Variables
- func NewPerNamespaceWorkerManager(params perNamespaceWorkerManagerInitParams) *perNamespaceWorkerManager
- func NewWorkerManager(workerComponents []workercommon.WorkerComponent, logger log.Logger, ...) *workerManager
- func PersistenceRateLimitingParamsProvider(serviceConfig *Config, ...) service.PersistenceRateLimitingParams
- func ServiceLifetimeHooks(lc fx.Lifecycle, svc *Service)
- func ServiceResolverProvider(membershipMonitor membership.Monitor) (membership.ServiceResolver, error)
- func ThrottledLoggerRpsFnProvider(serviceConfig *Config) resource.ThrottledLoggerRpsFn
- func VisibilityManagerProvider(logger log.Logger, metricsHandler metrics.Handler, ...) (manager.VisibilityManager, error)
- type Config
- type Service
Constants ¶
This section is empty.
Variables ¶
View Source
var Module = fx.Options( migration.Module, addsearchattributes.Module, resource.Module, deletenamespace.Module, scheduler.Module, batcher.Module, dlq.Module, dynamicconfig.Module, fx.Provide( func(c resource.HistoryClient) dlq.HistoryClient { return c }, func(m cluster.Metadata) dlq.CurrentClusterName { return dlq.CurrentClusterName(m.GetCurrentClusterName()) }, func(b client.Bean) dlq.TaskClientDialer { return dlq.TaskClientDialerFn(func(_ context.Context, address string) (dlq.TaskClient, error) { c, err := b.GetRemoteAdminClient(address) if err != nil { return nil, err } return dlq.AddTasksFn(func( ctx context.Context, req *adminservice.AddTasksRequest, ) (*adminservice.AddTasksResponse, error) { return c.AddTasks(ctx, req) }), nil }) }, ), fx.Provide(VisibilityManagerProvider), fx.Provide(ThrottledLoggerRpsFnProvider), fx.Provide(ConfigProvider), fx.Provide(PersistenceRateLimitingParamsProvider), service.PersistenceLazyLoadedServiceResolverModule, fx.Provide(ServiceResolverProvider), fx.Provide(func( clusterMetadata cluster.Metadata, metadataManager persistence.MetadataManager, logger log.Logger, ) namespace.ReplicationTaskExecutor { return namespace.NewReplicationTaskExecutor( clusterMetadata.GetCurrentClusterName(), metadataManager, logger, ) }), fx.Provide(NewService), fx.Provide(fx.Annotate(NewWorkerManager, fx.ParamTags(workercommon.WorkerComponentTag))), fx.Provide(NewPerNamespaceWorkerManager), fx.Invoke(ServiceLifetimeHooks), )
Functions ¶
func NewPerNamespaceWorkerManager ¶ added in v1.17.0
func NewPerNamespaceWorkerManager(params perNamespaceWorkerManagerInitParams) *perNamespaceWorkerManager
func NewWorkerManager ¶ added in v1.14.0
func NewWorkerManager( workerComponents []workercommon.WorkerComponent, logger log.Logger, sdkClientFactory sdk.ClientFactory, ) *workerManager
NewWorkerManager creates a new worker manager. The workerComponents argument must be first in order for the fx param tag to work correctly.
func PersistenceRateLimitingParamsProvider ¶ added in v1.17.2
func PersistenceRateLimitingParamsProvider( serviceConfig *Config, persistenceLazyLoadedServiceResolver service.PersistenceLazyLoadedServiceResolver, logger log.SnTaggedLogger, ) service.PersistenceRateLimitingParams
func ServiceLifetimeHooks ¶ added in v1.13.0
func ServiceResolverProvider ¶ added in v1.23.0
func ServiceResolverProvider( membershipMonitor membership.Monitor, ) (membership.ServiceResolver, error)
func ThrottledLoggerRpsFnProvider ¶ added in v1.13.0
func ThrottledLoggerRpsFnProvider(serviceConfig *Config) resource.ThrottledLoggerRpsFn
func VisibilityManagerProvider ¶ added in v1.16.0
func VisibilityManagerProvider( logger log.Logger, metricsHandler metrics.Handler, persistenceConfig *config.Persistence, customVisibilityStoreFactory visibility.VisibilityStoreFactory, serviceConfig *Config, persistenceServiceResolver resolver.ServiceResolver, searchAttributesMapperProvider searchattribute.MapperProvider, saProvider searchattribute.Provider, namespaceRegistry namespace.Registry, ) (manager.VisibilityManager, error)
Types ¶
type Config ¶
type Config struct { ScannerCfg *scanner.Config ParentCloseCfg *parentclosepolicy.Config ThrottledLogRPS dynamicconfig.IntPropertyFn PersistenceMaxQPS dynamicconfig.IntPropertyFn PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn PersistenceNamespaceMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter PersistenceGlobalNamespaceMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter PersistencePerShardNamespaceMaxQPS dynamicconfig.IntPropertyFnWithNamespaceFilter PersistenceDynamicRateLimitingParams dynamicconfig.TypedPropertyFn[dynamicconfig.DynamicRateLimitingParams] PersistenceQPSBurstRatio dynamicconfig.FloatPropertyFn OperatorRPSRatio dynamicconfig.FloatPropertyFn EnableBatcher dynamicconfig.BoolPropertyFn BatcherRPS dynamicconfig.IntPropertyFnWithNamespaceFilter BatcherConcurrency dynamicconfig.IntPropertyFnWithNamespaceFilter EnableParentClosePolicyWorker dynamicconfig.BoolPropertyFn PerNamespaceWorkerCount dynamicconfig.TypedSubscribableWithNamespaceFilter[int] PerNamespaceWorkerOptions dynamicconfig.TypedSubscribableWithNamespaceFilter[sdkworker.Options] PerNamespaceWorkerStartRate dynamicconfig.FloatPropertyFn VisibilityPersistenceMaxReadQPS dynamicconfig.IntPropertyFn VisibilityPersistenceMaxWriteQPS dynamicconfig.IntPropertyFn EnableReadFromSecondaryVisibility dynamicconfig.BoolPropertyFnWithNamespaceFilter VisibilityEnableShadowReadMode dynamicconfig.BoolPropertyFn VisibilityDisableOrderByClause dynamicconfig.BoolPropertyFnWithNamespaceFilter VisibilityEnableManualPagination dynamicconfig.BoolPropertyFnWithNamespaceFilter }
Config contains all the service config for worker
func ConfigProvider ¶ added in v1.16.0
func ConfigProvider( dc *dynamicconfig.Collection, persistenceConfig *config.Persistence, ) *Config
func NewConfig ¶
func NewConfig( dc *dynamicconfig.Collection, persistenceConfig *config.Persistence, ) *Config
NewConfig builds the new Config for worker service
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service represents the temporal-worker service. This service hosts all background processing needed for temporal cluster: Replicator: Handles applying replication tasks generated by remote clusters. Archiver: Handles archival of workflow histories.
func NewService ¶
func NewService( logger log.SnTaggedLogger, serviceConfig *Config, sdkClientFactory sdk.ClientFactory, esClient esclient.Client, clusterMetadata cluster.Metadata, clientBean client.Bean, clusterMetadataManager persistence.ClusterMetadataManager, namespaceRegistry namespace.Registry, executionManager persistence.ExecutionManager, membershipMonitor membership.Monitor, hostInfoProvider membership.HostInfoProvider, namespaceReplicationQueue persistence.NamespaceReplicationQueue, metricsHandler metrics.Handler, metadataManager persistence.MetadataManager, taskManager persistence.TaskManager, historyClient resource.HistoryClient, workerManager *workerManager, perNamespaceWorkerManager *perNamespaceWorkerManager, visibilityManager manager.VisibilityManager, matchingClient resource.MatchingClient, namespaceReplicationTaskExecutor namespace.ReplicationTaskExecutor, ) (*Service, error)
Directories ¶
Path | Synopsis |
---|---|
Package common is a generated GoMock package.
|
Package common is a generated GoMock package. |
Package dlq contains the workflow for deleting and re-enqueueing DLQ tasks.
|
Package dlq contains the workflow for deleting and re-enqueueing DLQ tasks. |
Package parentclosepolicy is a generated GoMock package.
|
Package parentclosepolicy is a generated GoMock package. |
Click to show internal directories.
Click to hide internal directories.