承接 solution10/circuitbreaker 相关项目开发

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

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

solution10/circuitbreaker

最新稳定版本:v1.2.0

Composer 安装命令:

composer require solution10/circuitbreaker

包简介

Simple circuitbreaker class that uses Doctrine\Cache to persist state

README 文档

README

Simple circuit breaker class.

Build Status Latest Stable Version Total Downloads License

Features

  • Adjustable thresholds
  • Adjustable cooldowns
  • Events on change
  • Any Doctine\Common\Cache\Cache implementation for persistence

Installation

Installation is via composer, in the usual manner:

$ composer require solution10/circuitbreaker

Example usage

<?php

$persistence = new \Doctrine\Common\Cache\ArrayCache();
$breaker = new \Solution10\CircuitBreaker\CircuitBreaker('my_backend_service', $persistence);

if ($breaker->isClosed()) {
    $response = doSomething();
    if ($response) {
        $breaker->success();
    } else {
        $breaker->failure();
    }
} else {
    gracefullyDegrade();
}

Userguide

Check out the Wiki

(or the /docs folder in the repo)

PHP Requirements

  • PHP >= 5.5

Author

Alex Gisby: GitHub, Twitter

License

MIT

Contributing

Contributors Notes

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2016-05-14