offers/rho

Microservice client framework

0.0.4 2016-07-22 20:19 UTC

This package is not auto-updated.

Last update: 2024-05-09 00:25:56 UTC


README

Usage

Check out the examples directory

Run the Tests

docker-compose build
docker-compose up -d
docker-compose exec rho phpunit

Logging

If you'd like your logs to include a name for the client you are wrapping, you can use Monolog processors like so:

// clone the logger to modify it w/o affecting the original
$myLogger = clone $logger;

$myLogger->pushProcessor(function ($record) {
    $record['extra']['client'] = 'My Client Name';
    return $record;
});

Rho\Retrier::wrap($client, ['logger' => $myLogger]);