support modern and legacy elasticsearch clients#132
support modern and legacy elasticsearch clients#132missinglink wants to merge 1 commit intomasterfrom
Conversation
|
note: I haven't tested the https://www.elastic.co/docs/reference/elasticsearch/clients/javascript/client-helpers |
| module.exports = { | ||
| v1: { | ||
| client: require('./src/client'), | ||
| createWriteStream: require('./src/sink') | ||
| }, | ||
| v2: { | ||
| client: require('./v2/client'), | ||
| createWriteStream: require('./v2/sink') | ||
| } | ||
| }; |
There was a problem hiding this comment.
This seems to be a breaking change to the interface of the dbclient module, meaning we'll need changes in all importers. Is that intended?
If so can you provide some instructions on how to test this PR as it stands?
There was a problem hiding this comment.
unfortunately I believe this is unavoidable due to the current export being on the root?
Line 5 in e98d950
There was a problem hiding this comment.
We could probably handle it as a breaking change, then migrate all importers to use the v1.createWriteStream path instead of the module root.
I'm open to ideas, just working around the limitations we have.
this is a proof-of-concept for supporting both the legacy elasticsearch client and the modern client.
it would be a breaking change to this repo but would allow us a path to migrate incrementally without breaking changes to the config.