Skip to content

Commit 10ca829

Browse files
committed
Add Cluster\RemoteInfo endoint
1 parent 4c7b5ae commit 10ca829

File tree

2 files changed

+59
-0
lines changed

2 files changed

+59
-0
lines changed
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
<?php
2+
3+
namespace Elasticsearch\Endpoints\Cluster;
4+
5+
use Elasticsearch\Endpoints\AbstractEndpoint;
6+
7+
/**
8+
* RemoteInfo Health
9+
*
10+
* @category Elasticsearch
11+
* @package Elasticsearch\Endpoints\Cluster
12+
* @author Zachary Tong <[email protected]>
13+
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache2
14+
* @link http://elastic.co
15+
*/
16+
class RemoteInfo extends AbstractEndpoint
17+
{
18+
/**
19+
* @return string
20+
*/
21+
public function getURI()
22+
{
23+
return "/_remote/info";
24+
}
25+
26+
/**
27+
* @return string[]
28+
*/
29+
public function getParamWhitelist()
30+
{
31+
return [];
32+
}
33+
34+
/**
35+
* @return string
36+
*/
37+
public function getMethod()
38+
{
39+
return 'GET';
40+
}
41+
}

src/Elasticsearch/Namespaces/ClusterNamespace.php

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -202,4 +202,22 @@ public function allocationExplain($params = array())
202202

203203
return $this->performRequest($endpoint);
204204
}
205+
206+
/**
207+
* $params[]
208+
*
209+
* @param $params array Associative array of parameters
210+
*
211+
* @return array
212+
*/
213+
public function remoteInfo($params = array())
214+
{
215+
/** @var callback $endpointBuilder */
216+
$endpointBuilder = $this->endpoints;
217+
218+
/** @var \Elasticsearch\Endpoints\Cluster\RemoteInfo $endpoint */
219+
$endpoint = $endpointBuilder('Cluster\RemoteInfo');
220+
221+
return $this->performRequest($endpoint);
222+
}
205223
}

0 commit comments

Comments
 (0)