Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPerMemberDynamicRateLimiterFactory ¶
func NewPerMemberDynamicRateLimiterFactory( service string, globalRPS dynamicconfig.IntPropertyFnWithDomainFilter, instanceRPS dynamicconfig.IntPropertyFnWithDomainFilter, resolver membership.Resolver, ) quotas.LimiterFactory
NewPerMemberDynamicRateLimiterFactory creates a new LimiterFactory which creates a new DynamicRateLimiter for each domain, the RPS for the DynamicRateLimiter is given by the globalRPS and averaged by member count for a given service. instanceRPS is used as a fallback if globalRPS is not provided.
func PerMember ¶
func PerMember(service string, globalRPS, instanceRPS float64, resolver membership.Resolver) float64
PerMember allows creating per instance RPS based on globalRPS averaged by member count for a given service. If member count can not be retrieved or globalRPS is not provided it falls back to instanceRPS.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.