config

package
v1.2.15-prerelease07 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: MIT Imports: 2 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       dynamicconfig.IntPropertyFn
	PersistenceGlobalMaxQPS dynamicconfig.IntPropertyFn
	EnableSyncMatch         dynamicconfig.BoolPropertyFnWithTaskListInfoFilters
	UserRPS                 dynamicconfig.IntPropertyFn
	WorkerRPS               dynamicconfig.IntPropertyFn
	DomainUserRPS           dynamicconfig.IntPropertyFnWithDomainFilter
	DomainWorkerRPS         dynamicconfig.IntPropertyFnWithDomainFilter
	ShutdownDrainDuration   dynamicconfig.DurationPropertyFn

	// taskListManager configuration
	RangeSize                            int64
	GetTasksBatchSize                    dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	UpdateAckInterval                    dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	IdleTasklistCheckInterval            dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	MaxTasklistIdleTime                  dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	NumTasklistWritePartitions           dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	NumTasklistReadPartitions            dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxOutstandingPolls         dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxOutstandingTasks         dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxRatePerSecond            dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	ForwarderMaxChildrenPerNode          dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	AsyncTaskDispatchTimeout             dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	LocalPollWaitTime                    dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	LocalTaskWaitTime                    dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	EnableGetNumberOfPartitionsFromCache dynamicconfig.BoolPropertyFnWithTaskListInfoFilters
	PartitionUpscaleRPS                  dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	PartitionDownscaleFactor             dynamicconfig.FloatPropertyFnWithTaskListInfoFilters
	PartitionUpscaleSustainedDuration    dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	PartitionDownscaleSustainedDuration  dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	AdaptiveScalerUpdateInterval         dynamicconfig.DurationPropertyFnWithTaskListInfoFilters
	EnableAdaptiveScaler                 dynamicconfig.BoolPropertyFnWithTaskListInfoFilters
	EnableStandbyTaskCompletion          dynamicconfig.BoolPropertyFnWithTaskListInfoFilters

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

	// taskWriter configuration
	OutstandingTaskAppendsThreshold dynamicconfig.IntPropertyFnWithTaskListInfoFilters
	MaxTaskBatchSize                dynamicconfig.IntPropertyFnWithTaskListInfoFilters

	ThrottledLogRPS dynamicconfig.IntPropertyFn

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

	ActivityTaskSyncMatchWaitTime dynamicconfig.DurationPropertyFnWithDomainFilter

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

	EnableTasklistOwnershipGuard dynamicconfig.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
	ActivityTaskSyncMatchWaitTime       dynamicconfig.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
	// 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
	// hostname
	HostName string
	// rate limiter configuration
	TaskDispatchRPS    float64
	TaskDispatchRPSTTL time.Duration
	// task gc configuration
	MaxTimeBetweenTaskDeletes time.Duration
	// standby task completion configuration
	EnableStandbyTaskCompletion func() bool
}

Jump to

Keyboard shortcuts

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