1 | <?php |
||
21 | class ChronosApiClient implements ApiClientInterface |
||
22 | { |
||
23 | /** |
||
24 | * @var HttpClientInterface |
||
25 | */ |
||
26 | private $oHttpClient; |
||
27 | |||
28 | /** |
||
29 | * @param HttpClientInterface $oHttpClient |
||
30 | */ |
||
31 | 16 | public function __construct( |
|
37 | |||
38 | /** |
||
39 | * @inheritdoc |
||
40 | * @link: https://mesos.github.io/chronos/docs/api.html#listing-jobs |
||
41 | */ |
||
42 | 2 | public function listingJobs() |
|
46 | |||
47 | /** |
||
48 | * @param JobEntityInterface $oJobEntity |
||
49 | * @return bool |
||
50 | * @throws ApiClientException |
||
51 | */ |
||
52 | 10 | public function addingJob(JobEntityInterface $oJobEntity) |
|
76 | |||
77 | /** |
||
78 | * @param JobEntityInterface|ChronosJobEntity $oJobEntity |
||
79 | * @return bool |
||
80 | * @throws ApiClientException |
||
81 | */ |
||
82 | 5 | public function updatingJob(JobEntityInterface $oJobEntity) |
|
86 | |||
87 | /** |
||
88 | * @param string $sJobName |
||
89 | * @return bool |
||
90 | */ |
||
91 | 2 | public function removeJob($sJobName) |
|
96 | |||
97 | /** |
||
98 | * @inheritdoc |
||
99 | */ |
||
100 | 2 | public function getJobStats($sJobName) |
|
104 | |||
105 | /** |
||
106 | * @param string $sUrl |
||
107 | * @return array |
||
108 | */ |
||
109 | 4 | private function sendGetJsonRequest($sUrl) |
|
119 | |||
120 | /** |
||
121 | * Returns true if the client can be connected to. |
||
122 | * @return bool |
||
123 | */ |
||
124 | public function ping() |
||
134 | } |