public DistributedCacheClientPolicyStore( IDistributedCache cache, IOptions <ClientRateLimitOptions> options = null, IOptions <ClientRateLimitPolicies> policies = null) : base(cache) { _options = options?.Value; _policies = policies?.Value; }
public RedisCacheClientPolicyStore( IConnectionMultiplexer redis, IOptions <ClientRateLimitOptions> options = null, IOptions <ClientRateLimitPolicies> policies = null) : base(redis) { _options = options?.Value; _policies = policies?.Value; }
public ClientRateLimitProcessor(ClientRateLimitOptions options, IRateLimitCounterStore counterStore, IClientPolicyStore policyStore) { _options = options; _counterStore = counterStore; _policyStore = policyStore; _core = new RateLimitCore(false, options, _counterStore); }
public ClientRateLimitProcessor( ClientRateLimitOptions options, IRateLimitCounterStore counterStore, IClientPolicyStore policyStore, IRateLimitConfiguration config) : base(options, counterStore, new ClientCounterKeyBuilder(options), config) { _options = options; _policyStore = policyStore; }
public ClientRateLimitProcessor( ClientRateLimitOptions options, IClientPolicyStore policyStore, IProcessingStrategy processingStrategy) : base(options) { _options = options; _policyStore = policyStore; _counterKeyBuilder = new ClientCounterKeyBuilder(options); _processingStrategy = processingStrategy; }
public ClientRateLimitMiddleware(RequestDelegate next, IOptions <ClientRateLimitOptions> options, IRateLimitCounterStore counterStore, IClientPolicyStore policyStore, ILogger <ClientRateLimitMiddleware> logger ) { _next = next; _options = options.Value; _logger = logger; _processor = new ClientRateLimitProcessor(_options, counterStore, policyStore); }