Php-pulse is a library for PHP that provides a set of interfaces for healthcheck and monitoring.
To install Php-pulse, run the following command:
composer require vesh95/heartbeat
To use Php-pulse, create a new instance of the HealthcheckRunner
class and add checks to it. Then, run the checks by
calling the run()
method.
use Vesh95\Heartbeat\HealthcheckRunner;
use Vesh95\Heartbeat\Check\CheckInterface;
$runner = new HealthcheckRunner();
$runner->append(new CheckInterface());
$results = $runner->run();
The run()
method returns a ResultsCollection
object that contains the results of the checks.
Contributions are welcome. Please see the contributing guide for more information.
Php-pulse is licensed under the MIT License. See the license file for more information.