Download the PHP package chocofamilyme/phalcon-healthcheck without Composer
On this page you can find all versions of the php package chocofamilyme/phalcon-healthcheck. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chocofamilyme/phalcon-healthcheck
More information about chocofamilyme/phalcon-healthcheck
Files in chocofamilyme/phalcon-healthcheck
Package phalcon-healthcheck
Short Description Serves functionality of healthchecks of your application
License BSD-3-Clause
Informations about the package phalcon-healthcheck
Phalcon Health Check Library
Health Check library adds new endpoints(routes) to your project which are used to check some services of your application. For example you want to check "Database Connection" of your microservice.
Installation
-
Example setting your application:
- Add above ServiceProvider class to the config config/providers.php
- Copy healthCheck.php to config/ and manage necessary configuration values for the project
Checks
- Database connection check
- Cache write&read check
- Sessions write&read check
- Storage check
Routes
-
/health
- /health/extended
How to write your custom checks
Create a class which implements Chocofamily\PhalconHealthCheck\Services\Checks\ComponentCheckInterface and add it to healthcheck.php config file like
Responses
There is a configuration param which describes which response class to use to output the response. For example
- /health - Chocofamily\PhalconHealthCheck\Responses\ChocofamilyResponse::class output would look like this
Feel free to add your responses, if you want for example to output it in a view instead json.
All versions of phalcon-healthcheck with dependencies
ext-phalcon Version >= 4.0.6
ext-json Version *