{"repo":"FriendsOfPHP/consul-php-sdk","free":true,"listed":false,"github":"https://github.com/FriendsOfPHP/consul-php-sdk","clone":"git clone https://github.com/FriendsOfPHP/consul-php-sdk.git","description":"PHP Consul SDK","language":"PHP","stars":317,"topics":["consul","sdk","consul-sdk","php"],"license":"MIT","category":"api-integrations-sdks","readme_excerpt":"Consul PHP SDK Consul PHP SDK is a thin wrapper around the Consul HTTP API. Compatibility See previous version of README.md to find some version compatible with older version of symfony/http-client or guzzle Installation This library can be installed with composer: composer require friendsofphp/consul-php-sdk Supported services agent catalog health kv session txn Usage Instantiate a services, and start using it: A service exposes few methods mapped from the consul API: All services methods follow the same convention: All API mandatory arguments are placed as first; All API optional arguments are directly mapped from $someOptions ; All methods return a Consul\\ConsulResponse ; If the API responds with a 4xx response, a Consul\\Exception\\ClientException is thrown; If the API responds with a 5xx response, a Consul\\Exception\\ServeException is thrown. Cookbook How to acquire an exclusive lock? How to use MultiLockHandler? How to use MultiSemaphore? Some utilities Consul\\Helper\\LockHandler : Simple class that implement a distributed lock Consul\\Helper\\MultiLockHandler : Simple class that implements a distributed lock for many resources Consul\\Helper\\MultiSemaphore : Simple class that implements a distributed semaphore for many resources Run the test suite You need a consul agent running on localhost:8500 . But you ca override this address: If you don't want to install Consul locally you can use a docker container: Then, run the test suite","default_branch":null,"files":null,"tree":[],"storefront":"/r/FriendsOfPHP","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/FriendsOfPHP/consul-php-sdk/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}