123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- namespace App\JsonRpc;
- use Hyperf\RpcClient\AbstractServiceClient;
- class EsService extends AbstractServiceClient implements EsServiceInterface
- {
- /**
- * 定义对应服务提供者的服务名称
- * @var string
- */
- protected string $serviceName = 'EsService';
- /**
- * 定义对应服务提供者的服务协议
- * @var string
- */
- protected string $protocol = 'jsonrpc-http';
- /**
- * 创建索引
- *
- * @param array $data
- * @return array
- */
- public function createIndex(array $data): array
- {
- var_dump($data, true, 'SERVICE=================1');
- return $this->__request(__FUNCTION__, $data);
- }
- public function associateData(array $data): array
- {
- return $this->__request(__FUNCTION__, $data);
- }
- public function searchIndex(array $data): array
- {
- return $this->__request(__FUNCTION__, $data);
- }
- public function deleteIndex(array $data): array
- {
- return $this->__request(__FUNCTION__, $data);
- }
- public function getDocument(array $data): array
- {
- return $this->__request(__FUNCTION__, $data);
- }
- public function updateData(array $data): array
- {
- return $this->__request(__FUNCTION__, $data);
- }
- public function deleteData(array $data): array
- {
- return $this->__request(__FUNCTION__, $data);
- }
- }
|