lamoda/tactician-rate-limit-bundle

该包已被废弃,不再维护。未建议替代包。

lamoda/tactician-rate-limit 库的 Symfony 扩展包

安装: 1

依赖者: 0

建议者: 0

安全: 0

星星: 4

关注者: 14

分支: 2

开放问题: 0

类型:symfony-bundle

0.1.2 2022-06-27 11:08 UTC

This package is auto-updated.

Last update: 2023-05-27 13:19:28 UTC


README

用于https://github.com/lamoda/tactician-rate-limit 的实用包装器

安装

使用非常简单

composer require lamoda/tactician-rate-limit-bundle
# Currently this bundle supports only https://github.com/davedevelopment/stiphle rate limiter, so install it:
composer require davedevelopment/stiphle
// Kernel

public function registerBundles()
{
    // ...
    $bundles[] = new \Lamoda\TacticianRateLimitBundle\LamodaTacticianRateLimitBundle();
    // ...
}
# config.yml
lamoda_tactician_rate_limit:
    logging:
        service: logger # to use logging
    rate_limiter:
        stiphle:
            service: stiphle # point to stiphle service
            
services:
    stiphle:
        class: Stiphle\Throttle\LeakyBucket