Add support for a global context option (#1256)

This commit is contained in:
Tomas Della Vedova
2020-07-13 14:36:53 +02:00
committed by delvedor
parent 28f2be397c
commit d73cb1a29b
16 changed files with 2995 additions and 1776 deletions

View File

@ -84,7 +84,8 @@ class Client {
generateRequestId: null,
name: 'elasticsearch-js',
auth: null,
opaqueIdPrefix: null
opaqueIdPrefix: null,
context: null
}, opts)
this[kInitialOptions] = options
@ -131,7 +132,8 @@ class Client {
nodeSelector: options.nodeSelector,
generateRequestId: options.generateRequestId,
name: options.name,
opaqueIdPrefix: options.opaqueIdPrefix
opaqueIdPrefix: options.opaqueIdPrefix,
context: options.context
})
/* istanbul ignore else */