-
John Cai authored
Currently, NewConcurrencyLimiter essentially hardcodes a ConcurrencyLimiter to be used for per RPC limiting. But, the concurrency limiter can be more generalized than that. We will be using it for pack-objects limiting. For this reason, we can generalize the constructor and move the specific per RPC limiting code into WithConcurrencyLimiters, since that is used specifically with middleware. Add a NewNullConcurrencyMonitor so we can use it in other packages. We can also rename newPromMonitor to newPerRPCPromMonitor since it's specifically creating metrics for RPCs, and the general sounding newPromMonitor is a bit of a misnomer.
6ddf1bf7