RateLimitPartition 类

定义

public static class RateLimitPartition
type RateLimitPartition = class
Public Class RateLimitPartition
继承
RateLimitPartition

方法

Get<TKey>(TKey, Func<TKey,RateLimiter>)

使用给定速率限制器工厂定义分区。

GetConcurrencyLimiter<TKey>(TKey, Func<TKey,ConcurrencyLimiterOptions>)

使用 给定 ConcurrencyLimiterOptions的 定义分区ConcurrencyLimiter

GetFixedWindowLimiter<TKey>(TKey, Func<TKey,FixedWindowRateLimiterOptions>)

使用 给定 FixedWindowRateLimiterOptions的 定义分区FixedWindowRateLimiter

GetNoLimiter<TKey>(TKey)

定义一个没有速率限制符的分区。 这意味着对 AttemptAcquire(TResource, Int32)AcquireAsync(TResource, Int32, CancellationToken) 的任何调用将始终针对给定 partitionKey的 成功。

GetSlidingWindowLimiter<TKey>(TKey, Func<TKey,SlidingWindowRateLimiterOptions>)

使用 给定 SlidingWindowRateLimiterOptions的 定义分区SlidingWindowRateLimiter

GetTokenBucketLimiter<TKey>(TKey, Func<TKey,TokenBucketRateLimiterOptions>)

使用 给定 TokenBucketRateLimiterOptions的 定义分区TokenBucketRateLimiter

适用于