Commit Graph

25 Commits

Author SHA1 Message Date
28370acf49 Remove Node.js v8 support (#1402) 2021-02-19 08:29:57 +01:00
bb05668a44 Updated license header (#1267) 2020-07-23 12:27:18 +02:00
c343302772 [Backport 7.x] Fix 1153 (#1161) 2020-05-14 09:57:44 +02:00
51169d5efa Support for Elasticsearch 7.7 (#1192) 2020-05-14 09:55:54 +02:00
7472c5ee94 Support for Elasticsearch 7.4 (#979)
* Update code generation (#969)

* Updated code generation scripts to use the new spec

* API generation

* Fix bad link

* Updated API reference doc (#945)

* Updated API reference doc

* Updated docs script

* Fix issue; node roles are defaulting to true when undefined (fal… (#967)

* Fix issue; nodeFilter was unable to filter because master, data, and ingest role were true if even they were false on the node.

* Test nodesToHost of BaseConnectionPool correctly maps node roles

* API generation

* Docker: use 7.4-SNAPSHOT

* API generation

* Use 7.4 stable
2019-10-02 11:17:32 +02:00
8c78f47ac3 Support for Elasticsearch 7.3 (#928) 2019-08-01 10:09:16 +02:00
bb0ff22fd2 Support for non-friendly chars in url username and password (#858)
* Support for non-friendly chars in url username and password
- Added auth option to Connection class
- Updated pool.addConnection

* Updated test
2019-05-20 17:10:17 +02:00
b1458e3511 Improve observability (#834)
* API generation

* Added correlation id support

* Updated docs

* Updated test

* Updated code generation

* API generation

* Updated code generation

* Added support for client name and custom context object

* Updated docs

* Updated test

* Fix docs

* Updated docs

* Added id support also for sniffing

* Updated test

* Update docs/observability.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Update docs/observability.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Apply suggestions

* Update docs/configuration.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Update docs/configuration.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Update docs/observability.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Update docs/observability.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Update docs/observability.asciidoc

Co-Authored-By: delvedor <delvedor@users.noreply.github.com>

* Apply suggestions

* Updated README.md

* Fixed test

* Addressed suggestions
2019-05-03 17:25:25 +02:00
9dacd9d9ee Better handling of hostname/ip:port format (#837)
* Better handling of hostname/ip:port format

* Updated test
2019-05-03 17:25:04 +02:00
02c656c364 Support for publish_address as hostname/ip:port (#804) 2019-04-09 12:06:22 +02:00
cae38e6b2b License (#773)
- Added license header
- Added license checker
- Fixed tap
2019-03-08 07:47:24 +01:00
5b856cd4c2 Child client support (#768)
With this pr we introduce the `client.child` API, which returns a new client instance that shares the connection pool with the parent client.
This feature can be handy if you need to have multiple client instances with different configurations, but with a shared connection pool.

Example:

```js
const { Client } = require('@elastic/elasticsearch')
const client = new Client({ node: 'http://localhost:9200' })
const child = client.child({
  headers: { 'x-foo': 'bar' },
  requestTimeout: 1000
})

client.info(console.log)
child.info(console.log)
```

**Open questions:**

* Currently, the event emitter is shared between the parent and the child(ren), is it ok?
* Currently, if you extend the parent client, the child client will have the same extensions, while if the child client adds an extension, the parent client will not be extended. Is it ok?

**Caveats:**

* You can override _any_ option except for the connection pool specific options (`ssl`, `agent`, `pingTimeout`, `Connection`, and `resurrectStrategy`).
* You can't specify a new `Connection` class.
* If you call `close` in any of the parent/child clients, every client will be closed.

_Note: the `nodeFilter` and `nodeSelector` options are now `Transport` options and no longer `ConnectionPool` options._
2019-02-21 12:48:49 +01:00
bcf895294b Updated test 2019-02-19 08:34:06 +01:00
d9a5f24e24 Code coverage++ 2019-02-11 17:37:44 +01:00
9936c0622a Updated test 2019-01-21 16:49:18 +01:00
f12424272f Updated test 2019-01-14 16:09:47 +01:00
dd9ce34079 Updated test 2018-12-19 19:49:40 +01:00
da710e26e1 Updated test 2018-11-19 11:35:02 +01:00
ca5e9ca743 Force close the server once the test is finished 2018-11-09 18:09:29 +01:00
9df4fcbbb6 Updated test 2018-11-09 17:17:05 +01:00
869b50fca9 Updated test 2018-11-08 19:41:33 +01:00
40cb37b2e8 Updated test 2018-11-05 19:22:36 +01:00
961b8224ef Updated test 2018-10-26 19:06:04 +02:00
aca2712161 Updated test 2018-10-24 15:52:17 +02:00
b6b04f99d8 WIP: Added some basic unit tests
- Added unit test
- Added test fixtures
- Added test utils
2018-10-22 16:54:14 +02:00