OpenSearch-Dashboards
OpenSearch-Dashboards copied to clipboard
[MD]Add client connection in data source plugin
- [ ] #1979
- [ ] #1980
- [ ] #2008
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
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.