承接 garlic/healthcheck 相关项目开发

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

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

garlic/healthcheck

Composer 安装命令:

composer require garlic/healthcheck

包简介

Health check Bundle used for graphQL schema introspection and whole schema merge at gateway

README 文档

README

This bundle is a backend for serviceDiscoveryEvent, which is uasually a part of garlic/gateway bundle.

This bundle allows to form graphQL introspection schema as a self-describing method and send it back to gateway to process and merge it.

Target microservice subscribing on serviceDiscovery event and forming serviceRebuildSchema command with response data as

{
  "name": "microservice_name",
  "data": "{...introspection_json_string}",
  "timing": "0.0021"
}

Installation

Just a one thing are necessary for this bundle works.

Add garlic/bus bundle to your composer.json

composer require garlic/healthcheck

bundles.php

config/bundles.php - add bundle initialisation

Garlic\HealthCheck\HealthCheckBundle::class => ['all' => true],

redis config

Add to your .env file next configuration values

REDIS_HOST=localhost
REDIS_PORT=6379
HEALTHCHECK_LOCK_TTL=30 - not nessessary, time in seconds until next run would be possible. Default is 30 sec

Usage

Service automatically begin to listen enqueue events with name serviceDiscovery and generate proper COMMAND for gaeway to rebuild actual whole schema introspection with new obtained data.

Data structure could be obtained at introspection.json

How to init event from outside

$container->get(CommunicatorService::class)
    ->serviceDiscoveryEvent(['date' => microtime(true)]);

How to send self-introspection manually

sf healthcheck:init

Response

Data structure to work with

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2018-12-11

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固