Download the PHP package kode/limiting without Composer

On this page you can find all versions of the php package kode/limiting. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package limiting

kode/limiting

高性能 PHP 限流器,支持令牌桶、滑动窗口算法,可用于本地和分布式限流。

功能特性

系统要求

安装

统一入口(推荐)

使用 Limiter 类可以更简洁地创建各种限流器:

快速开始

本地限流(令牌桶)

滑动窗口限流

分布式限流(跨机器)

并发任务控制

架构设计

API 文档

StoreInterface

存储接口,所有存储实现必须实现此接口。

RateLimiterInterface

限流器接口。

Limiter(统一入口)

统一入口类,提供简洁的 API 创建限流器。

TokenBucket

令牌桶限流算法。

SlidingWindow

滑动窗口限流算法。

DistributedLimiter

分布式限流器(基于 Redis)。

分布式并发控制器

本地并发控制器

DTO 对象

LimiterConfig

限流器配置(不可变对象)。

LimiterResult

限流结果(不可变对象)。

枚举类型

单元测试

测试覆盖所有核心功能,共计 35 个测试用例。

测试用例列表

运行测试

自定义存储

实现 StoreInterface 接口即可:

Redis 配置

单机模式

Sentinel 模式

Cluster 模式

使用场景

API 限流

秒杀活动

并发控制

开发

目录结构

许可证

Apache License 2.0 - 参见 LICENSE 文件


All versions of limiting with dependencies

PHP Build Version
Package Version
Requires php Version >=8.2
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package kode/limiting contains the following files

Loading the files please wait ...