php-http/throttle-plugin 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

php-http/throttle-plugin

最新稳定版本:1.1.0

Composer 安装命令:

composer require php-http/throttle-plugin

包简介

Throttle/request limiter plugin for HTTPlug

README 文档

README

PHP-HTTP plugin for throttling/rate limiting with the symfony/rate-limiter

Warning: Plugin currently utilizes usleep() and hence is blocking whole process while waiting

Install

Via Composer

composer require php-http/throttle-plugin

Usage

new \Http\Client\Common\Plugin\ThrottlePlugin(
    (new \Symfony\Component\RateLimiter\RateLimiterFactory(
        ['id' => 'foo', 'policy' => 'fixed_window', 'limit' => 2, 'interval' => '3 seconds'],
        new \Symfony\Component\RateLimiter\Storage\InMemoryStorage(),
    ))->create(),
);

Licensing

MIT license. Please see License File for more information.

统计信息

  • 总下载量: 11.79k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 2
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 2
  • Watchers: 4
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-02-23