config

package
v1.3.2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2025 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	PersistenceMaxQPS       dynamicproperties.IntPropertyFn
	PersistenceGlobalMaxQPS dynamicproperties.IntPropertyFn
	EnableSyncMatch         dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
	UserRPS                 dynamicproperties.IntPropertyFn
	WorkerRPS               dynamicproperties.IntPropertyFn
	DomainUserRPS           dynamicproperties.IntPropertyFnWithDomainFilter
	DomainWorkerRPS         dynamicproperties.IntPropertyFnWithDomainFilter
	ShutdownDrainDuration   dynamicproperties.DurationPropertyFn

	// taskListManager configuration
	RangeSize                                 int64
	ReadRangeSize                             dynamicproperties.IntPropertyFn
	GetTasksBatchSize                         dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	UpdateAckInterval                         dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	IdleTasklistCheckInterval                 dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	MaxTasklistIdleTime                       dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	NumTasklistWritePartitions                dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	NumTasklistReadPartitions                 dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxOutstandingPolls              dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxOutstandingTasks              dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxRatePerSecond                 dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxChildrenPerNode               dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	AsyncTaskDispatchTimeout                  dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	LocalPollWaitTime                         dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	LocalTaskWaitTime                         dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	TaskIsolationDuration                     dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	TaskIsolationPollerWindow                 dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	EnableGetNumberOfPartitionsFromCache      dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
	PartitionUpscaleRPS                       dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	PartitionDownscaleFactor                  dynamicproperties.FloatPropertyFnWithTaskListInfoFilters
	PartitionUpscaleSustainedDuration         dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	PartitionDownscaleSustainedDuration       dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	AdaptiveScalerUpdateInterval              dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	EnableAdaptiveScaler                      dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
	EnableStandbyTaskCompletion               dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
	EnableClientAutoConfig                    dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
	QPSTrackerInterval                        dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	EnablePartitionIsolationGroupAssignment   dynamicproperties.BoolPropertyFnWithTaskListInfoFilters
	IsolationGroupUpscaleSustainedDuration    dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	IsolationGroupDownscaleSustainedDuration  dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	IsolationGroupHasPollersSustainedDuration dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	IsolationGroupNoPollersSustainedDuration  dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	IsolationGroupsPerPartition               dynamicproperties.IntPropertyFnWithTaskListInfoFilters

	// Time to hold a poll request before returning an empty response if there are no tasks
	LongPollExpirationInterval dynamicproperties.DurationPropertyFnWithTaskListInfoFilters
	MinTaskThrottlingBurstSize dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	MaxTaskDeleteBatchSize     dynamicproperties.IntPropertyFnWithTaskListInfoFilters

	// taskWriter configuration
	OutstandingTaskAppendsThreshold dynamicproperties.IntPropertyFnWithTaskListInfoFilters
	MaxTaskBatchSize                dynamicproperties.IntPropertyFnWithTaskListInfoFilters

	ThrottledLogRPS dynamicproperties.IntPropertyFn

	// debugging configuration
	EnableDebugMode             bool // note that this value is initialized once on service start
	EnableTaskInfoLogByDomainID dynamicproperties.BoolPropertyFnWithDomainIDFilter

	ActivityTaskSyncMatchWaitTime dynamicproperties.DurationPropertyFnWithDomainFilter

	// isolation configuration
	EnableTasklistIsolation dynamicproperties.BoolPropertyFnWithDomainFilter
	AllIsolationGroups      func() []string
	// hostname info
	HostName string
	// rate limiter configuration
	TaskDispatchRPS    float64
	TaskDispatchRPSTTL time.Duration
	// task gc configuration
	MaxTimeBetweenTaskDeletes time.Duration

	EnableTasklistOwnershipGuard dynamicproperties.BoolPropertyFn
}

Config represents configuration for cadence-matching service

func NewConfig

func NewConfig(dc *dynamicconfig.Collection, hostName string, getIsolationGroups func() []string) *Config

NewConfig returns new service config with default values

type ForwarderConfig

type ForwarderConfig struct {
	ForwarderMaxOutstandingPolls func() int
	ForwarderMaxOutstandingTasks func() int
	ForwarderMaxRatePerSecond    func() int
	ForwarderMaxChildrenPerNode  func() int
}

type TaskListConfig

type TaskListConfig struct {
	ForwarderConfig
	EnableSyncMatch func() bool
	// Time to hold a poll request before returning an empty response if there are no tasks
	LongPollExpirationInterval                func() time.Duration
	RangeSize                                 int64
	ReadRangeSize                             dynamicproperties.IntPropertyFn
	ActivityTaskSyncMatchWaitTime             dynamicproperties.DurationPropertyFnWithDomainFilter
	GetTasksBatchSize                         func() int
	UpdateAckInterval                         func() time.Duration
	IdleTasklistCheckInterval                 func() time.Duration
	MaxTasklistIdleTime                       func() time.Duration
	MinTaskThrottlingBurstSize                func() int
	MaxTaskDeleteBatchSize                    func() int
	AsyncTaskDispatchTimeout                  func() time.Duration
	LocalPollWaitTime                         func() time.Duration
	LocalTaskWaitTime                         func() time.Duration
	PartitionUpscaleRPS                       func() int
	PartitionDownscaleFactor                  func() float64
	PartitionUpscaleSustainedDuration         func() time.Duration
	PartitionDownscaleSustainedDuration       func() time.Duration
	AdaptiveScalerUpdateInterval              func() time.Duration
	QPSTrackerInterval                        func() time.Duration
	EnablePartitionIsolationGroupAssignment   func() bool
	IsolationGroupUpscaleSustainedDuration    func() time.Duration
	IsolationGroupDownscaleSustainedDuration  func() time.Duration
	IsolationGroupHasPollersSustainedDuration func() time.Duration
	IsolationGroupNoPollersSustainedDuration  func() time.Duration
	IsolationGroupsPerPartition               func() int
	// taskWriter configuration
	OutstandingTaskAppendsThreshold      func() int
	MaxTaskBatchSize                     func() int
	NumWritePartitions                   func() int
	NumReadPartitions                    func() int
	EnableGetNumberOfPartitionsFromCache func() bool
	EnableAdaptiveScaler                 func() bool
	// isolation configuration
	EnableTasklistIsolation func() bool
	// A function which returns all the isolation groups
	AllIsolationGroups        func() []string
	TaskIsolationDuration     func() time.Duration
	TaskIsolationPollerWindow func() time.Duration
	// hostname
	HostName string
	// rate limiter configuration
	TaskDispatchRPS    float64
	TaskDispatchRPSTTL time.Duration
	// task gc configuration
	MaxTimeBetweenTaskDeletes time.Duration
	// standby task completion configuration
	EnableStandbyTaskCompletion func() bool
	EnableClientAutoConfig      func() bool
}

Jump to

Keyboard shortcuts

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