{"id":16331367,"url":"https://github.com/midoks/php-eureka-client","last_synced_at":"2025-10-12T09:33:27.574Z","repository":{"id":57017051,"uuid":"209951790","full_name":"midoks/php-eureka-client","owner":"midoks","description":"PHP client for the Netflix Eureka server","archived":false,"fork":false,"pushed_at":"2019-09-21T09:42:03.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-21T03:34:04.806Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"PHP","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/midoks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-09-21T08:39:12.000Z","updated_at":"2019-09-21T09:38:08.000Z","dependencies_parsed_at":"2022-08-22T09:30:28.910Z","dependency_job_id":null,"html_url":"https://github.com/midoks/php-eureka-client","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/midoks/php-eureka-client","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2Fphp-eureka-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2Fphp-eureka-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2Fphp-eureka-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2Fphp-eureka-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/midoks","download_url":"https://codeload.github.com/midoks/php-eureka-client/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/midoks%2Fphp-eureka-client/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279010936,"owners_count":26084837,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-12T02:00:06.719Z","response_time":53,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-10T23:26:47.742Z","updated_at":"2025-10-12T09:33:27.557Z","avatar_url":"https://github.com/midoks.png","language":"PHP","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![Build Status](https://travis-ci.org/midoks/php-eureka-client.svg?branch=master)](https://travis-ci.org/midoks/php-eureka-client)\n\n# PHP Eureka Client\n\nPHP client for the [Netflix Eureka server](https://github.com/Netflix/eureka). Supports all [Eureka REST operations](https://github.com/Netflix/eureka/wiki/Eureka-REST-operations).\n\n## Installation\nRun\n```\ncomposer require midoks/php-eureka-client\n```\nor add dependency to your composer.json file\n```\n\"require\": {\n    ...\n    \"midoks/php-eureka-client\": \"^1.0\"\n}\n\n```\n## Usage example\n### 1. Use needed packages\n```php\nuse Eureka\\Client;\n```\n### 2. Create Eureka app instance\n```php\n// We will use app name and instance id for making requests below.\n$client = new \\Euraka\\Client($this-\u003ehost, $this-\u003eport, $this-\u003econtext);\n\n```\n### 3. Create Eureka client\n```php\n\n// Create eureka v2 client.\n$client = new EurekaClient('localhost', 8080);\n\n// Create eureka v1 client.\n$client = new EurekaClient('localhost', 8080, 'eureka');\n```\n### 4. Make requests\n```php\ntry {\n  // Register new application instance.\n  $response = $client-\u003eregisterApp($appName, $instance);\n\n  // Query for all instances.\n  $allApps = $client-\u003egetAllApps();\n\n  // Query for all application instances.\n  $app = $client-\u003egetApp($appName);\n\n  // Query for a specific application instance.\n  $appInstance = $client-\u003egetAppInstance($appName, $instanceId);\n\n  // Query for a specific instance.\n  $instance = $client-\u003egetInstance($instanceId);\n\n  // Send application instance heartbeat.\n  $response = $client-\u003eheartBeat($appName, $instanceId);\n\n  // Take instance out of service.\n  $response = $client-\u003etakeInstanceOut($appName, $instanceId);\n\n  // Put instance back into service.\n  $response = $client-\u003eputInstanceBack($appName, $instanceId);\n\n  // Update metadata.\n  $response = $client-\u003eupdateAppInstanceMetadata($appName, $instanceId, [\n    'new_key' =\u003e 'new_value',\n  ]);\n\n  // Query for all instances under a particular vip address/\n  $instances = $client-\u003egetInstancesByVipAddress('test_vip_address');\n\n  // Query for all instances under a particular secure vip address.\n  $instances = $client-\u003egetInstancesBySecureVipAddress('test_secure_vip_address');\n\n  // De-register application instance.\n  $response = $client-\u003edeRegisterApp($appName, $instanceId);\n}\ncatch (Exception $e) {\n  echo $e-\u003egetMessage() . PHP_EOL;\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidoks%2Fphp-eureka-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmidoks%2Fphp-eureka-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmidoks%2Fphp-eureka-client/lists"}