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) |
|
77 | |||
78 | /** |
||
79 | * @param JobEntityInterface|ChronosJobEntity $oJobEntity |
||
80 | * @return bool |
||
81 | * @throws ApiClientException |
||
82 | */ |
||
83 | 5 | public function updatingJob(JobEntityInterface $oJobEntity) |
|
87 | |||
88 | /** |
||
89 | * @param string $sJobName |
||
90 | * @return bool |
||
91 | */ |
||
92 | 2 | public function removeJob($sJobName) |
|
97 | |||
98 | /** |
||
99 | * @inheritdoc |
||
100 | */ |
||
101 | 2 | public function getJobStats($sJobName) |
|
105 | |||
106 | /** |
||
107 | * @param string $sUrl |
||
108 | * @return array |
||
109 | */ |
||
110 | 4 | private function sendGetJsonRequest($sUrl) |
|
120 | |||
121 | /** |
||
122 | * Returns true if the client can be connected to. |
||
123 | * @return bool |
||
124 | */ |
||
125 | public function ping() |
||
136 | } |