permember

package
v1.2.14 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 4 Imported by: 0

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.

Jump to

Keyboard shortcuts

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