定制 postalservice14/php-actuator-silex-provider 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

postalservice14/php-actuator-silex-provider

Composer 安装命令:

composer require postalservice14/php-actuator-silex-provider

包简介

Silex Provider for php-actuator

README 文档

README

Latest Version on Packagist Software License Build Status Coverage Status Quality Score Total Downloads

Silex Provider for php-actuator

Install

Via Composer

$ composer require postalservice14/php-actuator-silex-provider

Parameters

  • health.indicators: An array of indicators to be used. Key as indicator name, value as indicator object.
  • health.endpoint: Endpoint for health checks. Defaults to "/health".

Registering

$app->register(new Actuator\Silex\Provider\HealthServiceProvider(), array(
    "health.indicators" => array(
        new DiskSpaceHealthIndicator()
    )
));

Usage

The following route is made available by default (unless you changed the "health.endpoint"):

  • GET /health: Get health indicator statuses

Getting Started

The following is a minimal example to get you started quickly. It uses the DiskSpaceHealthIndicator.

  • Create a composer.json with at minimum, the following dependecies
{
    "require": {
        "postalservice/php-actuator": "^1.0"
    }
}
  • Run composer install
  • Create /public/index.php
require_once __DIR__.'/../vendor/autoload.php';

use Silex\Application;
use Actuator\Health\Indicator\DiskSpaceHealthIndicator;
use Actuator\Health\Indicator\DoctrineConnectionHealthIndicator;
use Doctrine\DBAL\DriverManager;

$app = new Application();
$app['debug'] = true;

$app->register(new Actuator\Silex\Provider\HealthServiceProvider(), array(
    "health.indicators" => array(
        'diskspace' => new DiskSpaceHealthIndicator()
    )
));

$app->run();

Example

Available at /example

Change log

Please see CHANGELOG for more information what has changed recently.

Testing

$ composer test

Contributing

Please see CONTRIBUTING and CONDUCT for details.

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

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

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固