offers / rho
Microservice client framework
Installs: 2 122
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 10
Forks: 0
Open Issues: 0
Requires
- php: >=5.6.0
- guzzlehttp/guzzle: >=6.2.0
- predis/predis: >=1.0.3
Requires (Dev)
- monolog/monolog: >=1.19.0
This package is not auto-updated.
Last update: 2025-01-02 03:59:17 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]);