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
ddb72d6e50
Fix resurrect timeout formula ( #833 )
...
* Fixes #827
* Updated test
2019-04-29 09:19:53 +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
98e8bbd63d
Added cloud option and disable dead/alive handling if there is only one node and sniffing is disabled
2019-02-19 08:34:06 +01:00
b19d93fb1e
WIP: initial prototype
...
- Added body compression
- Removed old options
2019-02-11 12:01:52 +01:00
88c9fa8546
Consistent roles handling
2019-01-21 16:49:08 +01:00
ea3e54b255
Updated Connection Pool
...
- Merge nodes with same url but different id during update
- Cache auth data if provided when adding a connection
2019-01-14 16:08:20 +01:00
fc6d12ad3e
Updated closing logic
2018-12-19 19:49:29 +01:00
a9e621721e
WIP: initial prototype
...
- Added client.close API
- Added resurrect event
- Improved resurrect ping strategy
- Updated types
2018-12-10 20:15:42 +01:00
fd738f8425
WIP: initial prototype
...
- Standardized event emitters
- Refactored transport.request to have a better handling of the state
- Added sniff event
- Improved abort handling
2018-12-03 18:11:43 +01:00
ab1d7ba992
Typings support ( #737 )
...
* Updated scripts
* Updated .gitignore
* Removed symbols
* Fixed typo
* Added typings
* Updated test
* Added typings test
2018-11-30 17:01:55 +01:00
020165168c
WIP: initial prototype
...
- Expose connection info inside events
- Fixed minor bugs
2018-11-19 11:33:40 +01:00
3dd4f01370
WIP: initial prototype
...
- Renamed host configuration, now we use node(s)
- Updated Connection internals
- Added custom headers for Connection
2018-11-09 17:15:29 +01:00
e97f66b0c3
WIP: initial prototype
...
- Updated ConnectionPool internals
- Added ConnectionPool.update api
- Experimental: return http response in transform
2018-11-08 19:34:12 +01:00
d77d97d301
WIP: initial prototype
...
- Use plain node http.request
- WIP: connection closing procedure
- Updated ConnectionPool.getConnection
- Removed Selector class and expose a single configuration parameter
- Added compression handling
- Improved code documentation
2018-11-05 19:19:39 +01:00
8ce9f970f0
WIP: initial prototype
...
- Added randomizeHost option
- Added ignore status code option
- Updated error classes
- Added ndjson support
- Retry on 502/3/4
2018-10-25 17:10:00 +02:00
3c8aaaecd1
WIP: initial prototype
...
- Added more sniffing options
- Added support for different resurrection strategies
- Fixed url resolving
2018-10-24 15:52:11 +02:00
cef4e2dfc1
WIP: initial prototype
...
- Added support for request timeout
- Improved deserializer
- Fixed minor bugs
- Fixed typos
2018-10-22 16:50:17 +02:00
68cca6069b
WIP: initial prototype
...
- Added keep-alive Agent
- Added support for HTTPS
- Added log events
2018-10-19 15:04:07 +02:00
e1b80882af
Initial prototype
2018-10-18 17:27:31 +02:00