https://github.com/simonmacor/microservice-toolset
PHP toolset for a microservices architecture (logger, HTTP client compliant with the JSON-RPC standard)
https://github.com/simonmacor/microservice-toolset
json-rpc2 microservices-architecture php
Last synced: about 2 months ago
JSON representation
PHP toolset for a microservices architecture (logger, HTTP client compliant with the JSON-RPC standard)
- Host: GitHub
- URL: https://github.com/simonmacor/microservice-toolset
- Owner: simonmacor
- License: mit
- Created: 2024-08-21T18:59:47.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-08-29T01:30:43.000Z (almost 2 years ago)
- Last Synced: 2025-01-02T03:32:26.935Z (over 1 year ago)
- Topics: json-rpc2, microservices-architecture, php
- Language: PHP
- Homepage:
- Size: 56.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/simon/microservice-toolset/actions/workflows/ci.yml) [](https://coveralls.io/github/simonmacor/microservice-toolset)
# Microservice toolset
Microservice Toolset is a PHP library designed to support microservices architecture by providing a set of tools including a logger and an HTTP client that complies to the JSON-RPC standard.
Each service call generates a log entry for both the request sent and the response received. These entries include a context (which can be extended) that contains a correlation ID and a principal by default.
Microservice Toolset is compatible with Etcd and Consul for service registration and discovery.
## Requirements
- PHP 8.2 or higher
- Dependencies:
- [dcarbone/php-consul-api](https://github.com/dcarbone/php-consul-api): ^2.0
- [linkorb/etcd-php](https://github.com/linkorb/etcd-php): ^1.3
- [monolog/monolog](https://github.com/Seldaek/monolog): ^3.7
## Features
* [JSON-RPC 2.0](https://www.jsonrpc.org/specification) Compliant HTTP Client: Easily make JSON-RPC calls between services.
* Advanced Logging: Monolog handler for structured logging.
* Service Discovery: Integrates with Etcd, Consul or json file for service registration and discovery.
## Installation
You can install the package via Composer
```bash
composer require simonmacor/microservice-toolset
```
## Documentation
* [JSON-RPC client](docs/json_rpc.md)
* [Logging](docs/logging.md)
* [Service discovery](docs/service_discovery.md)
## License
This project is licensed under the MIT License - see the [LICENSE](./LICENSE) file for details.
### Third-Party Licenses
This project includes library [php-consul-api](https://github.com/dcarbone/php-consul-api) that are licensed under the Apache License 2.0.
You can find a copy of the Apache License 2.0 [here](https://www.apache.org/licenses/LICENSE-2.0).
### License Compatibility
While the majority of the code in this project is under the MIT License, the parts that are derived from or include code licensed under the Apache License 2.0 will continue to be governed by the terms of that license.
Please ensure that you adhere to the requirements of both licenses when using, modifying, or distributing the code.