承接 hirokws/callkeeper 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

hirokws/callkeeper

Composer 安装命令:

composer require hirokws/callkeeper

包简介

Sequential API call/access rate keeper to be under limited rate.

README 文档

README

Limit API calling to keep under limited rate per an unit time.

This implement is logic without using timer. So simple and light weight.

単位時間内でAPIの呼び出し回数を制限する。

タイマーを使用しない簡単なロジックで実装しているため、シンプルで軽い。

Laravelのワーカーとして利用するために開発したもの。APIコントロールは1常駐プロセスで行うと簡単に実現できる。

Usage

require __DIR__ . '/vendor/autoload.php';

use Callkeeper\Callkeeper;

...

/* Initialize */
$keep = new Callkeeper(3, 3000); // 3 times per 3,000 ms (3 seconds)

/* check and wait if needed */
$keep->limit();

$response = WebApiCalling(...);

...

Caution

This is simple keeper, so it is not thread safe. Also not async calling safe.

This is for sequential calling for single system from one process/thread.

License

MIT License.

Copyright reserved by Hirohisa Kawase.

Addition

Sorry for no test. It is hard to write tests for this type library... :P :D

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-12-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固