承接 webgriffe/amp-elasticsearch 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

webgriffe/amp-elasticsearch

最新稳定版本:2.3.0

Composer 安装命令:

composer require webgriffe/amp-elasticsearch

包简介

A non-blocking ElasticSearch client for PHP based on Amp.

README 文档

README

webgriffe/amp-elasticsearch is a non-blocking ElasticSearch client for use with the amp concurrency framework.

Build

Required PHP Version

  • PHP 7.4
  • PHP 8.0
  • PHP 8.1
  • PHP 8.2
  • PHP 8.3
  • PHP 8.4

Installation

composer require webgriffe/amp-elasticsearch

Usage

Just create a client instance and call its public methods which returns promises:

Loop::run(function () {
  $client = new Webgriffe\AmpElasticsearch\Client('http://my.elasticsearch.test:9200');
  yield $this->client->createIndex('myindex');
  $response = yield $this->client->indexDocument('myindex', '', ['testField' => 'abc']);
  echo $response['result']; // 'created'
});

See other usage examples in the tests/Integration/ClientTest.php.

All client methods return an array representation of the ElasticSearch REST API responses in case of sucess or an Webgriffe\AmpElasticsearch\Error in case of error.

Security

If you discover any security related issues, please email support@webgriffe.com instead of using the issue tracker.

License

The MIT License (MIT). Please see LICENSE for more information.

统计信息

  • 总下载量: 4.91k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 5
  • 点击次数: 1
  • 依赖项目数: 1
  • 推荐数: 0

GitHub 信息

  • Stars: 5
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2019-11-18