| @@ 105-113 (lines=9) @@ | ||
| 102 | * @param string $url |
|
| 103 | * @return array |
|
| 104 | */ |
|
| 105 | private function sendGetJsonRequest($url) |
|
| 106 | { |
|
| 107 | $response = $this->httpClient->get($url); |
|
| 108 | if (200 == $response->getStatusCode()) { |
|
| 109 | return $response->json(); |
|
| 110 | } |
|
| 111 | ||
| 112 | return []; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Returns true if the client can be connected to. |
|
| @@ 27-35 (lines=9) @@ | ||
| 24 | * @link: https://mesos.github.io/chronos/docs/api.html#listing-jobs |
|
| 25 | * @return array |
|
| 26 | */ |
|
| 27 | public function listingJobs() |
|
| 28 | { |
|
| 29 | $response = $this->httpClient->get('/v2/apps'); |
|
| 30 | if (200 == $response->getStatusCode()) { |
|
| 31 | return $response->json(); |
|
| 32 | } |
|
| 33 | ||
| 34 | return []; |
|
| 35 | } |
|
| 36 | ||
| 37 | /** |
|
| 38 | * @param JobEntityInterface $jobEntity |
|