OpenSearch-Dashboards icon indicating copy to clipboard operation
OpenSearch-Dashboards copied to clipboard

[MD]Add client connection in data source plugin

Open zhongnansu opened this issue 2 years ago • 2 comments

  • [ ] #1979
  • [ ] #1980
  • [ ] #2008

zhongnansu avatar Jul 27 '22 19:07 zhongnansu

we will not add OpenSearchDataService to OSD core, instead, I'd make it part of data source plugin. So we will register data source saved object type into dataSource plugin, and provide functions for other components to get OpenSearch client for data sources in request context

zengyan-amazon avatar Aug 02 '22 18:08 zengyan-amazon

Due to the change of design, we are moving the client management from a "core service" to data source plugin. The most uncertain refactor is how to expose "getDataSourceClient" function in request handler context. The previous idea is proved by POC that we can register it with "core context". But we can't apply the same within a plugin.

I am working on a POC to register "getClient()" interface, to request context from a plugin. It's likely it will be implemented in search plugin, and only be exposed to search plugin. While the actual service can be in data_source plugin.

zhongnansu avatar Aug 08 '22 22:08 zhongnansu