Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewVisibilityManager ¶
func NewVisibilityManager(persistence persistence.VisibilityManager, p Params) persistence.VisibilityManager
NewVisibilityManager creates a client to manage visibility with sampling For write requests, it will do sampling which will lose some records For read requests, it will do sampling which will return service busy errors. Note that this is different from NewVisibilityPersistenceRateLimitedClient which is overlapping with the read processing.
Types ¶
type Config ¶
type Config struct { VisibilityOpenMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter `yaml:"-" json:"-"` // VisibilityClosedMaxQPS max QPS for record closed workflows VisibilityClosedMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter `yaml:"-" json:"-"` // VisibilityListMaxQPS max QPS for list workflow VisibilityListMaxQPS dynamicconfig.IntPropertyFnWithDomainFilter `yaml:"-" json:"-"` }
Config is config for visibility
type Params ¶
type Params struct { Config *Config MetricClient metrics.Client Logger log.Logger TimeSource clock.TimeSource RateLimiterFactoryFunc RateLimiterFactoryFunc }
type RateLimiterFactory ¶
type RateLimiterFactory interface {
GetRateLimiter(domain string) tokenbucket.PriorityTokenBucket
}
func NewDomainToBucketMap ¶
func NewDomainToBucketMap(timeSource clock.TimeSource, numOfPriority int, qpsConfig dynamicconfig.IntPropertyFnWithDomainFilter) RateLimiterFactory
NewDomainToBucketMap returns a rate limiter factory.
type RateLimiterFactoryFunc ¶
type RateLimiterFactoryFunc func(timeSource clock.TimeSource, numOfPriority int, qpsConfig dynamicconfig.IntPropertyFnWithDomainFilter) RateLimiterFactory
Click to show internal directories.
Click to hide internal directories.