micro-lib/variable-value
Composer 安装命令:
composer require micro-lib/variable-value
包简介
Library for Variable Values
README 文档
README
Intention of Variable Values is to provide means for defined way of updating values of variables (for example configuration parameters) in long running processes.
For instance we might want to change connection timeout of our Http Client which is used php worker. Once worker is started and configuration is read from, let's say some database there is no way of changing it other than restarting worker. One solution would be to read configuration each time Http Client is trying to make a request. Although this is working solution it is not a very efficient one.
What if we get a way to read configuration from source in more smart way, like each n-th variable access or with some TTL value?
Variable Values brings this possibility.
Installation
composer require micro-lib/variable-value
Usage
Please check code samples in /examples folder.
In order to run examples please:
- clone repository
- run
composer install - run
php ./examples/datetime.php - run
php ./examples/readnum.php
统计信息
- 总下载量: 64
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2017-06-02