lamoda/tactician-rate-limit-bundle

Symfony bundle for lamoda/tactician-rate-limit library

0.1.1 2018-07-20 11:25 UTC

This package is auto-updated.

Last update: 2022-05-16 00:39:41 UTC


README

Utility wrapper for https://github.com/lamoda/tactician-rate-limit

Installation

Usage is as simple as

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