X-Opaque-Id support (#997)

* Added X-Opaque-Id support

* Updated type definitions

* Updated test

* Updated docs
This commit is contained in:
Tomas Della Vedova
2019-12-02 09:21:03 +01:00
committed by GitHub
parent 1e1252383d
commit 0f1746014c
7 changed files with 147 additions and 2 deletions

View File

@ -79,7 +79,8 @@ class Client extends EventEmitter {
nodeSelector: 'round-robin',
generateRequestId: null,
name: 'elasticsearch-js',
auth: null
auth: null,
opaqueIdPrefix: null
}, opts)
this[kInitialOptions] = options
@ -121,7 +122,8 @@ class Client extends EventEmitter {
nodeFilter: options.nodeFilter,
nodeSelector: options.nodeSelector,
generateRequestId: options.generateRequestId,
name: options.name
name: options.name,
opaqueIdPrefix: options.opaqueIdPrefix
})
const apis = buildApi({