public ClientRateLimitProcessor( ClientRateLimitOptions options, IRateLimitCounterStore counterStore, IClientPolicyStore policyStore, IRateLimitConfiguration config) : base(options, counterStore, new ClientCounterKeyBuilder(options), config) { _options = options; _policyStore = policyStore; }
public IpRateLimitProcessor( IpRateLimitOptions options, IRateLimitCounterStore counterStore, IIpPolicyStore policyStore, IRateLimitConfiguration config) : base(options, counterStore, new IpCounterKeyBuilder(options), config) { _options = options; _policyStore = policyStore; }
public ClientRateLimitMiddleware(RequestDelegate next, ILogger <ClientRateLimitMiddleware> logger, IRateLimitStore rateLimitStore, IOptions <RateLimitOptions> options) { _next = next; _rateLimitStore = rateLimitStore; _processor = new RateLimitProcessor(rateLimitStore); _logger = logger; _options = options.Value; }
public ClientRateLimitProcessor( ClientRateLimitOptions options, IClientPolicyStore policyStore, IProcessingStrategy processingStrategy) : base(options) { _options = options; _policyStore = policyStore; _counterKeyBuilder = new ClientCounterKeyBuilder(options); _processingStrategy = processingStrategy; }
public IpRateLimitProcessor( IpRateLimitOptions options, IIpPolicyStore policyStore, IProcessingStrategy processingStrategy) : base(options) { _options = options; _policyStore = policyStore; _counterKeyBuilder = new IpCounterKeyBuilder(options); _processingStrategy = processingStrategy; }
public RateLimitProcessor(IRateLimitStore rateLimitStore) { _rateLimitStore = rateLimitStore; }
/// <summary> /// 参数构造函数 /// </summary> /// <param name="rateLimitStore"><see cref="IRateLimitStore"/></param> public RateLimiter(IRateLimitStore rateLimitStore) { _rateLimitStore = rateLimitStore; }