tony-sol/symfony-consul
最新稳定版本:v1.0.0
Composer 安装命令:
composer require tony-sol/symfony-consul
包简介
Symfony ConsulBundle
README 文档
README
Requires these environment variables to be set:
CONSUL_HTTP_ADDRESS="localhost:8500" CONSUL_API_VERSION="v1" CONSUL_TIMEOUT=1
Required configuration example for KV Storage
consul_kv_provider: class: Consul\Engine\KV\KV factory: [ '@Consul\Service\ConsulServiceFactory', 'getKVEngine' ] Consul\Engine\KV\KVInterface: '@consul_kv_provider'
Usage example
public function __construct( private \Consul\Engine\KV\KVInterface $consulKVStorage ) { } public function set(): void { $key = 'foo'; $value = 'bar'; $this->consulKVStorage->set($key, $value); } public function get(): void { $key = 'foo'; $value = $this->consulKVStorage->get($key); // $value instanceof ConsulResponseInterface // (string)$value = 'bar' }
Disclaimer
All information and source code are provided AS-IS, without express or implied warranties. Use of the source code or parts of it is at your sole discretion and risk. Citymobil LLC takes reasonable measures to ensure the relevance of the information posted in this repository, but it does not assume responsibility for maintaining or updating this repository or its parts outside the framework established by the company independently and without notifying third parties.
Вся информация и исходный код предоставляются в исходном виде, без явно выраженных или подразумеваемых гарантий. Использование исходного кода или его части осуществляются исключительно по вашему усмотрению и на ваш риск. Компания ООО "Ситимобил" принимает разумные меры для обеспечения актуальности информации, размещенной в данном репозитории, но она не принимает на себя ответственности за поддержку или актуализацию данного репозитория или его частей вне рамок, устанавливаемых компанией самостоятельно и без уведомления третьих лиц.
统计信息
- 总下载量: 2
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-09-01