rackbeat/php-throttler
最新稳定版本:0.9.2
Composer 安装命令:
composer require rackbeat/php-throttler
包简介
Throttle PHP function calls and iteration runs by X executions per second.
README 文档
README
Throttle PHP actions to only run a set amount of times within a given timeframe.
Especially useful to avoid rate limiting, high CPU usage or DOS'ing your own services (database etc.)
Installation
You just require using composer and you're good to go!
composer require rackbeat/php-throttler
Usage
Basic example
use Rackbeat\Throttler\Throttler; Throttler::make( range(1,100) )->allow(10)->every(1)->run( function($value, $key) { // do something with $value } );
Requirements
- PHP >= 7.3
统计信息
- 总下载量: 34.06k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 11
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2019-11-03