0f1746014c
X-Opaque-Id support ( #997 )
...
* Added X-Opaque-Id support
* Updated type definitions
* Updated test
* Updated docs
2019-12-02 09:21:03 +01:00
a948a98be6
Refactored connection pool ( #913 )
...
* Refactored ConnectionPool
- Created BaseConnectionPool class
- Created CloudConnectionPool
- connection pool updates are immutable
- resurrect now happens inside getConnection()
* Rewritten connection pool(s) type definitions
* Updated test
* Fixed test
* Fix if check
* Removed old files
* Improve code coverage
* Updated license header
* Fix if check
* Improve code coverage
* Updated coverage script
2019-07-26 11:43:48 +02:00
36a1666cc8
Updated license header ( #915 )
2019-07-22 11:46:59 +02:00
0ebbd71e9a
Improve authentication handling ( #908 )
2019-07-18 10:33:11 +02:00
269c0fc96a
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:23:40 +02:00
cae38e6b2b
License ( #773 )
...
- Added license header
- Added license checker
- Fixed tap
2019-03-08 07:47:24 +01:00
8398ae2f4b
Updated Elastic Cloud config
2019-02-28 10:57:42 +01:00
7e318cb334
Enable compression for both request and response when using Elastic Cloud
2019-02-21 15:39:01 +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
974bf0a819
Added global headers option
2019-02-20 12:43:06 +01:00
0915c8c613
Added force option to extend method
2019-02-19 09:33:25 +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
5e7ca876e4
Added extend method ( #763 )
...
* Added extend method
* Updated test
2019-01-30 19:10:59 +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
aa5977b153
WIP: initial prototype
...
- Added error parameter to request and response event
- Dropped error event
- Updated typescript indentation
2018-12-05 22:18:32 +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
0701a795c2
Node v6 fix
2018-11-09 17:32:29 +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
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
55c507c423
API generation
2018-10-30 17:26:22 +01:00
c9635c4a71
WIP: initial prototype
...
- Added support for different format of requestTimemout
- Changed api method result
- Now we are always returning the result in case of error
- Improved body deserialization
- Added cast to boolen for HEAD requests
- Added support for already serialized strings in the ndserializer
- Fixed qserializer in case of null object
- Updated Errors
2018-10-30 16:32:10 +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